In my Content section I have a property editor (Archetype) that allows to set content for the site independently from the content tree. It looks like this:
I need to display only the sub categories from one category based on what page I'm currently on. What I have now is:
var catItems =Umbraco.Content(1123).categoryItem;//get the Set Content property editor from Content Sectionforeach(var item in catItems){foreach(varsubin item.GetValue<ArchetypeModel>("subCatItem")){<div class="tbl_dt"><p class="offerName">@sub.GetValue("offerName")</p><p class="departurePort">@sub.GetValue("departurePort")</p></div>}
}
This is displaying all the sub category items from all categories. It should display only the sub categories based on current page. How can I make the connection between current page and the sub category item? Or it is best to stick with the property editor in the content tree pages?
Get fields from Archetype based on current page
In my Content section I have a property editor (Archetype) that allows to set content for the site independently from the content tree. It looks like this:
I need to display only the sub categories from one category based on what page I'm currently on. What I have now is:
is working on a reply...