Highlights:
Accessing the data:
var file = System.Web.Hosting.HostingEnvironment.VirtualPathProvider.GetFile("/Global/Images/[Folder Name]/[Image-Name]") as UnifiedFile;
"The Summary property exposes a IUnifiedSummary type which gives us access to properties like Author, Comments, Category etc, and more importantly a Dictionary for accessing other properties we create (like Website)."
file.Summary.Dictionary["Website"]
Simple example of accessing the Summary properties in code:
<div class="featured">
<img src="<%= Image.VirtualPath %>" alt="<%= Image.Summary.Title %>" />
<p>
<a href="<%= Image.Summary.Dictionary["Website"] %>"><%= Image.Summary.Author %>a>
<em><%= Image.Summary.Dictionary["Description"]%>em>
p>
div>
That is exactly what I was looking for. Thanks for posting it.
ReplyDelete