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

    Im new to Revo and I wonder if I did understand the concept of containers, I guess not smiley
    My question is:
    In which case would I disable the container setting of a document containing other documents?
    Someone told me, he allways disable container for reasons of getting problems with FURL, but to me that doesnt make sense.

    In my personal logic a container would be a ressource having no content, but just holding other resources, and thus if it has content, it's not a container.
    BUT it seem a ressource becomes a container automatically if I add a child ressource.

    So please help me, if Im not sure myself, how can I explain to a client he had to select a setting or not?

    Have a wonderfull day

    Nudi
      Smile, it confuses people!
      • 4172
      • 5,888 Posts
      By default a Resource becomes a Container automatically, as soon, as you add children to it.

      For example, if you want to have empty containers, which may have children later, you can check this checkbox manually.

      This way, it gets a URL like

      alias/

      (if you didn't change the system-setting container-suffix)
      also, if it doesn't have children, yet.

      otherwise, it would have a URL like

      alias.html

      depending on the file-extension - setting of the selected content-type
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 3749
        • 24,544 Posts
        I think this might help you: http://bobsguides.com/blog.html/2013/04/27/understanding-isfolder-and-haschildren()/

        BTW, having the container status set automatically when children are added is true of Evolution, but not Revolution last time I checked.
          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
          • 21893
          • 113 Posts
          Hi and sorry, I've been hit down by a flu, sleeping for 2 weeks had helped.

          so thanks Bruno, I decided to change the system settings for getting always a "alias.html" and that seems to work, I dont have to bother the client with "check the container"

          @BobRay: Your article was really helpful for understanding, but Im really confused since this is not true for me:
          Quote from: BobRay at Mar 28, 2014, 06:22 PM
          BTW, having the container status set automatically when children are added is true of Evolution, but not Revolution last time I checked.

          I doublechecked (version 2.2.13) If I have a ressource which is not a container and I create a new child-ressource, the parent-ressource becomes a container! I swear. smiley

            Smile, it confuses people!
            • 21893
            • 113 Posts
            Hi and sorry, I've been hit down by a flu, sleeping for 2 weeks had helped.

            so thanks Bruno, I decided to change the system settings for getting always a "alias.html" and that seems to work, I dont have to bother the client with "check the container"

            @BobRay: Your article was really helpful for understanding, but Im really confused since this is not true for me:
            Quote from: BobRay at Mar 28, 2014, 06:22 PM
            BTW, having the container status set automatically when children are added is true of Evolution, but not Revolution last time I checked.

            I doublechecked (version 2.2.13) If I have a ressource which is not a container and I create a new child-ressource, the parent-ressource becomes a container! I swear. smiley

            Have a nice week
            Nudibranch
              Smile, it confuses people!
            • It does if you create the new resource as a child of an existing one. The problem is that if you drag an existing resource into another one, the new "parent" resource doesn't get its "container" setting checked.
                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
                If I have a ressource which is not a container and I create a new child-ressource, the parent-ressource becomes a container!

                I'm pretty sure that wasn't the case when I wrote the article and I'm almost positive that it wasn't the case when I wrote my book.

                It seems an odd choice (especially with the inconsistency Susan points out), since my understanding was that the hasChildren() method was introduced so that isfolder could be independent of whether the resource had 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