Where media picker placed? Is it on the home page node?
I think you have to call media picker in the home page like that:
var homePage = Umbraco.AssignedContentItem.AncestorOrSelf(1);
var typedMultiMediaPicker = homePage.GetPropertyValue<IEnumerable<IPublishedContent>>("asscoiates_logos_slider");
Get Multiple Images from Media Picker from another Model
I have a Master template which has the header and footer for each page.
Each page thereafter is rendered inside that Master template using @RenderBody().
In the Hompage Model I have a media picker using multiple images.
I can call the media picker on the homepage but not on any other page
Works on hompega eusing the following
When displaying from a page that is not the homepage i get error
System.NullReferenceException: Object reference not set to an instance of an object.
Im thinking its because the properties are set on the homepage therefore works on home page.
Otherwise : How do I do recursive with multiple images with media picker.
Hi James
Where media picker placed? Is it on the home page node?
I think you have to call media picker in the home page like that:
Alex
Awesome Alex, that's the ticket.
I had that same idea as well but using different code which was wrong, perfect - Thanks a lot :)
is working on a reply...