We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8168
    • 1,118 Posts
    Hi,

    Is it possible using getResources to use a different TPL for items in the site-tree - so, for parent items using TPL1 and then children items use TPL2? So I will use getResources to pull resources from the main parent folder titled MASTER FOLDER

    e.g.

    Master folder

    - Folder 1
    -- Child 1 1
    -- Child 1 2

    - Folder 2
    -- Child 2 1
    -- Child 2 2

    So Folder 1 and Folder 2 would use TPL1 and Child 1 1, Child 1 2, Child 2 1 and Child 2 2 will use TPL2.

    Is that possible?

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

    • discuss.answer
      GetResources by its nature does not deal with levels as such, it creates a single flat output. Perhaps you would be better off using Wayfinder, or even better pdoMenu to create your structured output.

      While by default pdoMenu (and Wayfinder) creates a simple nested unordered list, you can use tpls for each section of the output to form any structure you want.
        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
        • 8168
        • 1,118 Posts
        Quote from: sottwell at Dec 30, 2015, 05:41 PM
        GetResources by its nature does not deal with levels as such, it creates a single flat output. Perhaps you would be better off using Wayfinder, or even better pdoMenu to create your structured output.

        While by default pdoMenu (and Wayfinder) creates a simple nested unordered list, you can use tpls for each section of the output to form any structure you want.

        Good idea Susan - now why didnt I think of using WayFinder! Great stuff - thanks wink