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 Section
foreach (var item in catItems)
{
foreach (var sub in 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?