@{
//get current colour dropdown value
var currentColour = Model.Content.GetPropertyValue<string>("colour");
// we get the parent of the current page, and look for all children with the matching colour property
var similarColouredSiblings = Model.Content.Parent.Children(f => f.Id != Model.Content.Id && f.HasValue("Colour") && f.GetPropertyValue<string>("Colour") == currentColour);
}
<ul>
@foreach (var sibling in similarColouredSiblings)
{
<li>@sibling.Name - @sibling.Id - @sibling.GetPropertyValue("Colour")</li>
}
</ul>
Match current page dropdown list multiple values with its siblings
Good morning,
I'm trying to figure out a way to show a list of nodes with the same selected dropdown list prevalues as the current page.
Say my current page selected dropdown list prevaules are:
"blue", "white" and "red".
Now I would like to list all sibling nodes with the same selected prevaules.
Happy funky Friday!
Hi David
Something like this ?
(there aren't zillions of siblings ?)
regards
Marc
Thank's Marc,
I will try this out today.
Not zillions, but hundreds... :) Something like 200 to be more specific.
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.