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

    Trying to create the following:

    [Resources]
    + 10. Head Parent
    + 10.1 Sub parent1
    - Sub Child
    - Sub Child
    - Sub Child
    + 10.2 Sub parent2
    - Sub Child
    - Sub Child
    - Sub Child
    + 10.3 Sub parent3
    - Sub Child
    - Sub Child
    - Sub Child

    [Output]
    <h4>Sub parent 1</h4>
    <div>child1</div>
    <div>child2</div>
    <div>child3</div>

    <h4>Sub parent 2</h4>
    <div>child1</div>
    <div>child2</div>
    <div>child3</div>

    [Snippet call]
    [[!getResources?
    &parents=`10` --> the head parent
    ]]

    Can it be done with one call? So the output generates the title of the parent and childs.


    Hope someone has done this before smiley
      • 4172
      • 5,888 Posts
      can be done in one call with wayfinder or with migxGetCollectionTree (included with MIGX)

      or with nested getResources - calls.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 42042
        • 140 Posts
        Quote from: Bruno17 at Jul 10, 2015, 03:47 PM
        can be done in one call with wayfinder or with migxGetCollectionTree (included with MIGX)

        or with nested getResources - calls.

        Thanks for this fast reply! I have both plugins installed. Do you have a example or a startpoint in docs? That would be great!
          • 42562
          • 1,145 Posts
          You might be looking for this, pdoTools, which claims to be faster than Wayfinder and getResources in this kind of business.

          [[pdoMenu? //pdoMenu is part of pdoTools
              &parents=`9`
              &level=`100`
              &limit=`0`
              &showHidden =`1`
              &tplOuter=`@INLINE [[+wrapper]]`
              &tpl=`@INLINE <div>[[+menutitle]] ([[+link]])</div>` //remove +link if you want
              &tplParentRow=`@INLINE <h4>[[+menutitle]] - [[+link]]</h4>[[+wrapper]]`
              &sortby=`pagetitle`
              &sortdir=`ASC`
          ]]

          Try migxGetCollectionTree, might be better than all this stuff.
            TinymceWrapper: Complete back/frontend content solution.
            Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
            5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
            • 4172
            • 5,888 Posts
            If donshakespeare's pdoMenu does what you want, use this one.
            Otherwise I can put a migxGetCollectionTree - call together for you.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 42042
              • 140 Posts
              Quote from: Bruno17 at Jul 10, 2015, 07:35 PM
              If donshakespeare's pdoMenu does what you want, use this one.
              Otherwise I can put a migxGetCollectionTree - call together for you.

              Thanks. I will look in to it and get back here asap!