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

    I wonder how to set up the resource structure. Which resources are usually used / set up? For example, is it useful to create an empty resource like "legal" and put in sites like imprint, gerneral terms and conditions, privacy policy, etc. in there as child resources to "organize" them in a folder?

    Some people use CSS resources, error pages (401, etc.), sitemap.xml, robots.txt, and much more. Because I am new to modx I would like to see some examples and find a useful structure for my future site(s) – I cannot think of yet.

    Thanks.
      • 3749
      • 24,544 Posts
      It really depends on the purpose of the site. BTW, the Forum no longer shows uploaded images, so people who reply with an image of their tree structures will have to put the image somewhere else and provide a link to it.

      MODX itself doesn't care how the tree is organized, so you should organize it for your own convenience in finding things.

      The only practical consideration is that you'll probably be using Wayfinder for your menus, and possibly showing lists of abbreviated resources with getResources or pdoResources.

      Wayfinder will make the menu structure match the directory tree structure, so keep that in mind when organizing resources that will be shown as menu links.

      getResources and pdoResources will aggregate and display collections of resources. You tell them the "parents" you want them to use, and they'll pull children of those resources (i.e., resources below them in the Resource tree) for display.

      A typical use would be a page like this one, showing descriptions and links to a collection of resources. Or, [urlhttps://bobsguides.com/guide-to-packages.html]this one[/url], which shows descriptions and links to MODX extras I've written in alphabetical order.

      You can see much of the structure of my Resource tree from the mega menu on the second page above. It's actually three Wayfinder menus stitched together for the Bread, MODX, and RV, sections (each of which are under their own folder in the tree) along with some extra links (e.g., Home and Contact) to pages that could be anywhere in the tree. This is fairly uncommon. Usually a single Wayfinder menu provided the menu for a whole site. I just couldn't make that work with the Sky Mega Menu code I used for the menu.

      When pages are set with "Show in Menus" unchecked, it doesn't really matter where they are in the tree. Just put them where you can find them easily.

      Hope this helps.
        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