Hi guys,
I’ve got a problem, and it’s a little more complicated than usual, so please bare with me as I try to explain.
I’ve got a tree structure like this for example
/ homes (1)
/name 1(2)
/design 1 (3)
/design 2 (4)
/design 3 (5)
/name 2 (5)
/design 1 (6)
/design 2 (7)
/design 3 (8)
/name 3 (9)
/design 1 (10)
/design 2 (11)
/design 3 (12)
What I want to do is when, click on say name 2 (id 5), it just lists the following:
/name 1(2)
/name 2 (5)
/design 1 (6)
/design 2 (7)
/design 3 (8)
/name 3 (9)
or as similar if name 1 is clicked on then it only shows
/name 1(2)
/design 1 (3)
/design 2 (4)
/design 3 (5)
/name 2 (5)
/name 3 (9)
I know it can be done, but I really need an example to show me.
I’ve currently got a chunk like so:
<div class="ditto_item" id="ditto_item_[+id+]">
<div class="ditto_introText">[+introtext+]</div>
</div>
Called from:
[[Ditto?parents=`1` &tpl=`dittoDwellingsSideMenu`]]
I hope you are all following...
My guess is that this can be achieved by
Doing a something like this, but I really need to know how to use the WHERE parameter.
EG make a call like this on the side menu system of:
[[Ditto?parents=`1` &tpl=`dittoDwellingsSideMenu2`]]
Chunk to be called:
<div class="ditto_item" id="ditto_item_[+id+]">
<div class="ditto_introText">[+introtext+]</div>
</div>
[[Ditto? WHERE "the current page we are on = the parent ID "]]
I hope this all makes sense. I’m going to play around, but I don’t know all of the MODX back end calls. So I will probably end up ripping out my hair.
Any thoughts or answers would be very helpful.
Thanks in advance!
Steve.