In my footer I have a picture that I get with this method
@{ var allNodesWithTags = Model.AncestorOrSelf().DescendantsOrSelf(); } @foreach (var node in allNodesWithTags.Where("todaysPicture== true"))
This dosen't seem very good for performance though, having to check every node and then getting the image. Instead I've thought about using a content picker and selecting the node and then getting the values. Two questions about this.
1. Is there a way to make it recursive? 2. Is this better for performance? 3. Any code examples :)
Recursive Contentpicker Razor
Hi!
In my footer I have a picture that I get with this method
@{ var allNodesWithTags = Model.AncestorOrSelf().DescendantsOrSelf(); }
@foreach (var node in allNodesWithTags.Where("todaysPicture== true"))
This dosen't seem very good for performance though, having to check every node and then getting the image. Instead I've thought about using a content picker and selecting the node and then getting the values. Two questions about this.
1. Is there a way to make it recursive?
2. Is this better for performance?
3. Any code examples :)
Any help is appreciated.
/ Niklas
is working on a reply...