Hello Umbraco's Friend,
Getting the media picker URL not described in below URL.
I have tried many ways but didn't succeed.
Could you please help me out.
I guess you have an image property in Nested Content element using Media Picker? In that case you can just access the image like the following, where image is the property alias:
@{
var items = Model.Value<IEnumerable<IPublishedElement>>("promoList");
foreach(var item in items)
{
var name = item.Value<string>("PromoCompanyName");
var promoPercentage = item.Value<string>("promoPercentage");
var image = item.Value<IPublishedContent>("image");
<h1>@name</h1>
<p>@promoPercentage</p>
if (image != null)
{
<img src="@image.Url" alt="">
}
}
}
Can't get Media Picker URL (Nested Content)
Hello Umbraco's Friend, Getting the media picker URL not described in below URL. I have tried many ways but didn't succeed. Could you please help me out.
https://our.umbraco.com/documentation/getting-started/backoffice/Property-Editors/Built-in-Property-Editors/Nested-Content/
Hi Rayyan
I guess you have an image property in Nested Content element using Media Picker? In that case you can just access the image like the following, where
image
is the property alias:/Bjarne
is working on a reply...