We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36975
    • 4 Posts
    Hi all! I'm trying to use this code in my chunk:

    [[!getResources? 
    &toPlaceholder=`showborder`
    &parents=`` 
    &limit=`0` 
    &depth=`0` 
    &sortby=`menuindex` 
    &sortdir=`ASC`
    &tpl=`tpl-leftmenu2` 
    ]]
    
    Z [[+showborder]] X


    but it returns "Z X" without getResources result. if i remove " &toPlaceholder=`showborder` " from snippets propeties it works OK and returns result before "Z X".

    what am I doing wrong?

    This question has been answered by BobRay. See the first response.

    • discuss.answer
      • 3749
      • 24,544 Posts
      How is the chunk being included in the page output? The placeholder may be being parsed before getResources has set it (since getResources is cached and the placeholder is not).

      Try using
      [[!+showborder]]
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 36975
        • 4 Posts
        gratz!! thank you very much! smiley

        chunk being included :
        [[$mychunk]]