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...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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...