Last active
December 11, 2015 15:19
-
-
Save nul800sebastiaan/4620491 to your computer and use it in GitHub Desktop.
Razor media
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if (post.HasValue("mediaFolder")) | |
{ | |
var media = library.MediaById(post.mediaFolder); | |
foreach (var item in media.Children()) | |
{ | |
<li> | |
<a href="@item.umbracoFile"> | |
<img style="width: 100px; height: 100px;" src="@item.umbracoFile" /> | |
</a> | |
</li> | |
} | |
} |
StatusUpdate doctype: add prop - mediaFolder of type
media picker
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ms.Save(folder);
document.SetValue("mediaFolder", folder.Id);