Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi All,
I'm looking for some help with getting all pages within my site based on a document type & checkbox list property value.
I have a property on a category page that determines what the page category is.
I also have a checkbox list on an application page that I can assign multiple categories.
I'm having issues checking if the checkbox list contain a value equal to the property on the category page.
@{ var category = Model.Content.GetPropertyValue("coreCategory"); var selection = Model.Content.AncestorOrSelf(1).DescendantsOrSelf().OfTypes("application", "service").Where(x => x.IsVisible()); } <ul> @foreach(var item in selection.Where(x => x.GetPropertyValue<IEnumerable<string>>("coreCategories").Contains(category))){ <li> <a href="@item.Url">@item.Name</a> <p>@item</p> </li> } </ul>
My site tree looks something like this:
Home - Page Category A - Has Dropdown to assign single Category Group - Page Category B - Has Dropdown to assign single Category Group
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Get All Pages Based on Document Type & Property Value Checkbox List
Hi All,
I'm looking for some help with getting all pages within my site based on a document type & checkbox list property value.
I have a property on a category page that determines what the page category is.
I also have a checkbox list on an application page that I can assign multiple categories.
I'm having issues checking if the checkbox list contain a value equal to the property on the category page.
My site tree looks something like this:
Home - Page Category A - Has Dropdown to assign single Category Group - Page Category B - Has Dropdown to assign single Category Group
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.