I have a nested content data type making use of a document type with 2 x textbox, 1 x media picker and 1 multi Url picker. I can render the text and media properties as normal but not the mutli Url Picker with the following code
@inherits Umbraco.Web.Mvc.UmbracoViewPage
@{
var items = Model.Value<IEnumerable<IPublishedElement>>("homeBannerSettings");
}
@if (items.Any())
{
foreach (var item in items)
{
var bannerTitle = item.Value("homeBannerTitle");
var bannerBlurb = item.Value("homeBannerBlurb");
var bannerLink = item.Value("homeBannerLink");
<div class="jumbotron rounded-0 text-white">
<h1 class="display-4">@bannerTitle</h1>
<p class="lead">@bannerBlurb</p>
<p class="lead">
<a class="btn btn-primary btn-lg" href="@bannerLink" role="button">Learn more</a>
</p>
</div>
}
}
rendering nested content properties
Dear Umbraco Team
I have a nested content data type making use of a document type with 2 x textbox, 1 x media picker and 1 multi Url picker. I can render the text and media properties as normal but not the mutli Url Picker with the following code
The above code displays a 404 error with
When nested content link property is clicked. To resolve this error i used the following code
Now when i get a YSOD
for nested content text properties.
How do you render nested content properties in Umbraco 8 correctly ?
Thanks Dibs
Hi,
You can either convert it to strongly type model as that will help with better error handling.
PS: I don't know alias of your Nested Document Type so have named it NestedDocumentType in below code.
Please review and let me know if this helps or you need further assistance.
Cheers,
Shaishav
Thanks Shaishav
for your reply.
no works as expected, i may have had cache issue with local dev environment
Dibs : )
is working on a reply...