MNTP2 Loop through nodes and only show selected values
I have a blog category picker which is a multi node tree picker, the categories are defined by other documents on the site, like various industries in the industries section. The problem is, the blog is new so there are lots of empty categories. Is it possible to loop through all of the posts somehow and only show the MNTP options that have been selected on any of the posts?
Currently I'm looping through like this, but this loop doesn't know if any of the options have been "chosen" on a blog post.
var resourceTypeStart = Umbraco.Content(3855);
var resourceTypeSelection = resourceTypeStart.Descendants().Where("Visible");
<ul>
@{
foreach (var resourceTypeFilter in resourceTypeSelection) {
<li><a href="/resources/[email protected]">@resourceTypeFilter.Name</a></li>
}
}
</ul>
MNTP2 Loop through nodes and only show selected values
I have a blog category picker which is a multi node tree picker, the categories are defined by other documents on the site, like various industries in the industries section. The problem is, the blog is new so there are lots of empty categories. Is it possible to loop through all of the posts somehow and only show the MNTP options that have been selected on any of the posts?
Currently I'm looping through like this, but this loop doesn't know if any of the options have been "chosen" on a blog post.
is working on a reply...