Skip to the content

Working with Nested Content in Umbraco 8

So to get started login to your Umbraco 8 back office and then follow these Steps

Step 1. Create a new Doc Type with no template containing the property fields of the content you would like you nested content items to show

Step 2. Now go to the permissions of your new Doc Type and make sure you click ( Is an Element Type ). save and publish.

Step 3. Navigate to the Doc Type of the page you want to show your nested content on and add a new property using the Nested Content Editor and when configuring your Property editor Choose your newly created doc type and your element and make sure group is set to the correct group for your content. save and publish everything.

Step 4. Now click on the content section of your Umbraco 8 Back Office and populate your new Nested Content Properties with the content you would like to show( you can have as many nested content items as you like just be sure when you configured your nested content editor you said the min and max number of items to display)

Step 5. Now your field are populated with content your going to want to render it onto your actual web page to do this go the the page template you are going to be adding your nested content to and type the neccisary code. Here is a sample of how i rendered my code.

@{ 
if(Model.Nest != null && Model.Nest.Count() > 0)
{
foreach(var contentItem in Model.Nest)
{
<div class="col-md-12">
<h2>@contentItem.Title</h2>
<h4>@contentItem.Summary</h4>
@contentItem.MainText
</div>
}
}
}

Step 6. Once you have entered your code in the way you want you nested content implementing save everything and reload your website. You will now see your Nested content items Displayed on your page where you placed them in the page template.

About the author

Nathan Reece

.Net MVC Developer | Umbraco Novice

Hey Guys,

I'm an New Developer with a passion for coding. I absolutely love working with Umbraco CMS and appreciate the Umbraco community even more.

I've got 3 years+ .Net experience and 5 years+ experience working in the Web Develepment industry, both coding and marketing job websites. I wanted to use my skills to help give something back to this awesome community and UmbraJobs.com seems like the right place to do just that.

Follow me on social media

If you're an Umbraco professional, partner, employer, recruiter or a passionate Umbraco community builder then I'm more than happy to hear from you. Follow me on my social media channels and please reach out if you have any needs, want help or consultation with anything Umbraco related or just want a general chat.

comments powered by Disqus

Blog Filter


How we can help?

Need help with an Umbraco project?

Need help with a project but not too sure who to approach? Send us your project brief and budget. We will provide a free consultation and can help you gather quotes from the best and most suitable freelancers or agencies.

Looking to hire an Umbraco Professional?

Have you got job vacancy and want to hire an Umbraco professional? Post a job on our website for free. Alternatively let us know your requirements and we will send suitable prospects your way.

Claim your free profile!

Are you an Umbraco Freelance Developer or Umbraco partner that wants to advertise on our site? If you work with Umbraco or registered as an Umbraco partner then you can create a profile for free.

Let's build the Umbraco Community

We're big on building the Umbraco community and we think you guys are awesome! If there's anyway at all we can help then please reach out.