In my Content section I have a property editor (Archetype) that allows to set content for the site independently from the content tree. I need to display only the sub categories from one category based on what page I'm currently on. What I have now is:
//get the content with id of 1123 from Content Section, type DynamicPublishedContent
var catItems = Umbraco.Content(1123).categoryItem;
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>
}
}
See this reference for other details: Umbraco 7: Get fields from same property based on current page
Q: How can I map the property to a content page and check if is associated with current page and display only the fields with mapped current page? Can this be done by adding a content picker
to it? If so how could I check if it is associated with current page?