(1) I have a folder that contains a set of documents. On the web page for that folder I want to display a list of those documents. In the document content of the folder I put the following snippet call and I get the list I want (where the ID of the folder is "5"):
[[DropMenu? &startDoc=`5` ]]
(2) I have a number of other folders where I wish to repeat this pattern. I want to define a chunk, say "{{list_my_children}}", that I can place on each such folder. I want the chunk to contain a snippet call to DropMenu. In the snippet call I want the ID of the current page to be supplied by MODx and inserted into the StartDoc parameter. It seems like the following should work, but it doesn’t:
[[DropMenu? &startDoc=`[*id*]` ]]
(3) I’ve tried every variation I can think of, but can’t get MODx to pass the folder’s id to the snippet call. Can anyone recommend a solution?
-
☆ A M B ☆
- 24,524 Posts
&startDoc=`[*id*]` should work; I use that all the time. Try calling the snippet uncached.
Calling it uncached,
[!DropMenu... !]
instead of
[[DropMenu... ]]
works perfectly.
Thank you so much.