An interesting change when using level=2
-
I’m trying to figure this out.
I have a topic list that goes in my sidebar, and the code looked like this:
[pass list=A~Z] [loop exists type="page" parent=213024 include=children field=alpha value={ITEM} orderby=name] <details> <summary><strong><span style="font-size: 130%;">{Item}</span></strong></summary> <div> [the-loop] [field title-link]<br/ > [/the-loop] </div> </details> [/loop] [/pass]The topic list is an alphabetic list where the letter expand to show all the countries that start with that letter.
Then I changed it to this (switching include=children to level=2):
[pass list=A~Z] [loop exists type="page" parent=213024 level=2 field=alpha value={ITEM} orderby=name] <details> <summary><strong><span style="font-size: 130%;">{Item}</span></strong></summary> <div> [the-loop] [field title-link]<br/ > [/the-loop] </div> </details> [/loop] [/pass]and the topic list now shows only the current letter that is being viewed, and W. i.e. if I’m on the page for Albania, it will show A and W, and if I’m on the page for France, it will show F and W.
My original thought was to speed things up by only having it look at the first-gen children. Now I realize all I needed to do was remove include=children altogether. I think that was there from earlier when I was trying to add in the states to the US listing, which I still want to do, but have pushed off).
However, the funny thing is that level=2 was affected by the page it was on, and I’m trying to figure out why that is. Shouldn’t the levels be determined from the parent, which I set with the ID? In addition, this is in the sidebar which isn’t strictly speaking rendered as part of the page either, is it? Do you know what’s going on? Thanks.
The topic ‘An interesting change when using level=2’ is closed to new replies.