We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    The Wayfinder docs are somewhat ambiguous on this.

    Do the parent tpls affect any menu item that is a folder or only folders that have children?

    I’m guessing the latter. Either way, this should be clarified in the docs.

    From the Wiki:

    &parentRowTpl
    the template chunk for any document that is a folder


    &parentClass - (parent)
    CSS class denoting the menu item is a folder (has children)
      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
      • 25663 MODX Staff
      • 12,272 Posts
      Should really be "container" which is based on the flag in the manager, but containers don’t necessarily have to have children. No idea if it functions that way.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 7231
        • 4,205 Posts
        According to my test parentRowTpl is only called if there are children, regardless of if the document is a container or not.

        Did not test the parentClass yet. Just tested it and it is the same as above, the class only is displayed if there are children regardles of being a container.

        Wayfinder does not rely on the container flag, it actually checks for children and basses the parent status on this.
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 3749
          • 24,544 Posts
          Quote from: dev_cw at Aug 06, 2008, 08:21 AM

          According to my test parentRowTpl is only called if there are children, regardless of if the document is a container or not.

          Did not test the parentClass yet. Just tested it and it is the same as above, the class only is displayed if there are children regardles of being a container.

          Wayfinder does not rely on the container flag, it actually checks for children and bases the parent status on this.

          Thanks! I edited the Wiki. There are probably other place this should be changed as well.

          Can a document have children without being a container? If so, I would think that should be considered a bug.

            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
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Only under certain conditions, such as a badly written snippet or module or plugin. A document can be assigned another document as parent, but the parent document’s record in the database is not updated to have its "isfolder" field set to 1. Or if there is some kind of database corruption. When this happens, the "child" document will never be seen in the document tree.

              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
              • 3749
              • 24,544 Posts
              Quote from: sottwell at Aug 06, 2008, 11:47 AM

              Only under certain conditions, such as a badly written snippet or module or plugin. A document can be assigned another document as parent, but the parent document’s record in the database is not updated to have its "isfolder" field set to 1. Or if there is some kind of database corruption. When this happens, the "child" document will never be seen in the document tree.

              I can see how that could happen. I’m guessing that the core code would never create such a condition on its own and that you can’t do it in the Manager.
                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