We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10525
    • 247 Posts
    Quote from: sottwell at Sep 30, 2015, 07:03 AM
    Perhaps &startId=`0` &excludeDocs=`2` &includeDocs=`[[getChildren]]` where you have a simple snippet getChildren that uses the $modx->getChildIds() function.
    Thanks Susan, I see what you're doing there, but would that not effectively be the same as &includeDocs=`1, 2, 24, 170, 7, 13, 23`
    &excludeDocs=`2`
    ?

    [[pdoMenu? &parents=`-1` &resources=`1, 24, 170, 7, 13, 23`]]
    Cotton, that looks nice and simple. I almost ditched WF for pdoMenu, but now I know about it I may be tempted next time.

    &parentRowTpl=`MyParentRowTpl`
    Bob, I think that would work if it applied to all the parent rows. But my selection of pages to include doesn't follow any pattern, it's just a page here and a parent there.

    This is one of these multi-day-consuming issues that make me realise how fast I got stuff done with bare-naked PHP, MySQL, JS, HTML & CSS. Addons are great, but almost always lead to a place where a normal thing becomes difficult. What's the best compromise I wonder?..

    Thanks for your answers.
      • 50574
      • 70 Posts
      I also had a similar issue here: http://forums.modx.com/thread/97675/eval-array-parents-but-don-039-t-include-named-child-ids-in-input-or-output#dis-post-530940 where I could call the parents to get their children in an array and then 'skip' the parent to remove the parent resource only from the array (see #76 in the code in that post).

      Don't know if that's of any use with WF or for your situation but I know that adding children and then removing the parent is possible.
        • 3749
        • 24,544 Posts
        This is one of these multi-day-consuming issues that make me realise how fast I got stuff done with bare-naked PHP, MySQL, JS, HTML & CSS. Addons are great, but almost always lead to a place where a normal thing becomes difficult. What's the best compromise I wonder?

        I hear you, but I don't have a good answer. The menu at Bob's Guides is actually a mega-menu wrapper around a number of separate Wayfinder calls. I spent days on it, but couldn't get it to work any other way.
          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
          • 10525
          • 247 Posts
          Thanks Cotton. I've done it now aand on to the next problem, but I'll keep that for future reference smiley

          Bob, I actually have done this too; I have a big footer menu constructed from 5 separate Wayfinder calls. It doesn't seem so bad when there are a lot of pages to display, but in my case, for only 6 pages, it showed up the inadequacy of WF. I think a wee change in WF would solve this: simply by making the parent dependency optional and allowing the &includeDocs list to be taken literally. Looks like pdoMenu already does this, but no reason not to keep improving WF. Seems a bit daft for a CMS with such pedigree to still have basic problems with its most widely-used(?) menu addon.