Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi.
How do I display the image from a media picker used in a partial view parameter?
This just gives the id.
@Model.MacroParameters["image"]
Leon
I found it - copied and altered from another post. Here is the code in my partial view macro.
var imgId = Model.MacroParameters["image"]; var mediaItem = Umbraco.TypedMedia(imgId); <img src="@mediaItem.GetPropertyValue("umbracoFile")" alt="@mediaItem.GetPropertyValue("Name")"/>
How to use Multiple Media Picker in Partial View
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
display image from media picker in partial view macro parameter
Hi.
How do I display the image from a media picker used in a partial view parameter?
This just gives the id.
Leon
I found it - copied and altered from another post. Here is the code in my partial view macro.
How to use Multiple Media Picker in Partial View
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.