We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6342
    • 5 Posts
    I’ve been wondering this for a while, since there doesn’t seem to be any functional difference between a standard resource with children, and a resource with Container checked on Page Settings. Am I missing something?

    Thanks,
    adam
      • 20413
      • 2,877 Posts
      I think Wayfinder etc. make use of it even if works without checking it. smiley
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        This is mainly for use in the Document Tree. If you clear the checkbox for a document that has children, the children will no longer be visible in the Document Tree! It’s also useful in menu or listing snippets to assist in generating nested lists.

        Since the setting will be automatically updated in the database when a child is assigned a parent, the checkbox really isn’t necessary; although it’s useful for "demoting" a document in the Tree when all of its children have been moved or deleted.
          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
          • 25663 MODX Staff
          • 12,272 Posts
          I am currently working on cleaning up the Evo branch and actually debated removing this flag. Yes, it offers a degree of flexibility, but no more so than what can be done with the link attributes. To me, I see it causing more problems and confusion than for the super-corner-case where it’s actually useful and serves a real purpose (beyond demoing, which can likewise be demod by creating a doc).

          Thoughts on getting more clutter out of the Manager page by nuking this field?
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            The only downside that I see is that now there won’t be a way to get rid of the setting if all children are moved or deleted. I suppose it could be done in code; every time a document is moved or deleted check the old parent and see if it’s got any more children, clear the setting if it doesn’t.
              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
              • 6342
              • 5 Posts
              Thanks for all the replies. I say lose it! smiley
                • 16183
                • 1,390 Posts
                Interesting. I have never noticed this smiley

                /k
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Quote from: sottwell at Aug 21, 2009, 11:54 AM

                  The only downside that I see is that now there won’t be a way to get rid of the setting if all children are moved or deleted. I suppose it could be done in code; every time a document is moved or deleted check the old parent and see if it’s got any more children, clear the setting if it doesn’t.
                  I think if you move docs in and out of a Container it automatically converts to a container and back. Obviously not if you do it programatically (unless you add that too). That said, I’m probably wrong!
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Coincidentally I was looking at the code for the move_document processor, and it does have code for setting that field to 0 if there are no more children. I haven’t looked at the delete code yet. But I do know that occasionally I end up with "folders" that just say "this folder is empty"; never paid much attention to exactly how that came about.
                      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
                      • 3647
                      • 177 Posts
                      Me too and have had to uncheck the container flasg manually to get rid of the + in the tree
                      especially happens if you delete child pages as it doesn’t seem to reset the flag if there are no child pages
                      and also if you have jot comments and delete them.

                      Slight annoyance, but easy to put up with if getting rid of it throws up other issues!

                      Mark