We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20765
    • 90 Posts
    myfriendscallmebill Reply #1, 17 years, 8 months ago
    (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?
    • &startDoc=`[*id*]` should work; I use that all the time. Try calling the snippet uncached.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 20765
        • 90 Posts
        myfriendscallmebill Reply #3, 17 years, 8 months ago
        Calling it uncached,
        [!DropMenu... !]
        instead of
        [[DropMenu... ]]
        works perfectly.
        Thank you so much.