My question is how do I only get the clubs that has the "current" club selected? I'm guessing I have to write a ".Where(x => ..." but I can't seem to find the correct syntax
I hope someone can help me and make it all more clear :-)
Are you looking for all the clubs that are a child under the current city?
Because wouldn't that be similar to how you've gathered the selection of cities?
It be something along the lines of:
@foreach (var cityItem in selection)
{
var clubs = cityItem.Children("clubs").Where(x => x.IsVisible());
...
}
Then get the information you need.
Please let me know if this has helped.
Nested foreach using children from content pickers
Hi Gurus,
Can someone help a noob :-)
I have created some cities, some clubs and some training-centers.
On each club/trainingcenter I have a contentpicker that points to the city, but how do I show which clubs and centers are present in the current city?
my current code looks like this:
My question is how do I only get the clubs that has the "current" club selected? I'm guessing I have to write a ".Where(x => ..." but I can't seem to find the correct syntax
I hope someone can help me and make it all more clear :-)
/Jimmy Dan Mortensen
Hi Jimmy,
Are you looking for all the clubs that are a child under the current city? Because wouldn't that be similar to how you've gathered the selection of cities?
It be something along the lines of:
Then get the information you need. Please let me know if this has helped.
Kind Regards, Lewis
Hi Lewis,
They are not children to cityItem, but I have almost gotten it to work. I'm just having issues with how to use the x.GetPropertyValue == nodeSelClubs.
It's something really stupid, but I'll post it here when I get it working.
/Jimmy
is working on a reply...