I am brand new to Umbraco and trying to wrap my head around what's happening.
I am trying to implement a bootstrap carousel. I want the end users to be able to choose the banner images and banner text, so I created a new Doc Type called "BannerSlide" to represent a single slide in the carousel. It has two properties, banner image and alt text.
I created a new data type using the Nested Content. Then on my home page doc type I added a tab and used the new data type for my editor. So far so good.
In the template for the home page, I added this code:
<!-- Wrapper for slides -->
<div class="carousel-inner">
@{
var items = Model.GetPropertyValue<IEnumerable<IPublishedContent>>("homePageCarouselBanner");
foreach(var item in items)
{
@Umbraco.Field(item)
}
}
</div>
Then I went the content for Home Page, and the carousel editor showed up, allowed me to choose the images for multiple slides. So far so good.
I hit save and publish, but when I go to the site, I get a yellow screen of death and the error message:
Need help understanding Nested Content
I am brand new to Umbraco and trying to wrap my head around what's happening.
I am trying to implement a bootstrap carousel. I want the end users to be able to choose the banner images and banner text, so I created a new Doc Type called "BannerSlide" to represent a single slide in the carousel. It has two properties, banner image and alt text.
I created a new data type using the Nested Content. Then on my home page doc type I added a tab and used the new data type for my editor. So far so good.
In the template for the home page, I added this code:
Then I went the content for Home Page, and the carousel editor showed up, allowed me to choose the images for multiple slides. So far so good.
I hit save and publish, but when I go to the site, I get a yellow screen of death and the error message:
'Umbraco.Web.Models.RenderModel
What did I do wrong?
Hi
I think you need something like
That's untested so it might need tweaking.
HTH Steve
Thanks, that got me going in the right direction!
is working on a reply...