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

    Today I tried to put all my "true pages" in a root-folder named "pages". Problem was I got the "pages" showing up in every URL e.g. (mydomain.com/pages/home/)

    Below is what I am looking for and If you know how to get that done, please let me know.

    [pages] <-- Here goes all pages the you would like to see in your menu or sitemap
    [resources] <-- Here goes all resources like contacts, modules, teasers, campaigns..things you would re-use all over your web site.
    [system] <-- Here goes error-pages, google-sitemap etc.

    If possible, I would like to set permissions on those folders as-well. For example, a "writer" should only be able to see and work with the contents in the folder [pages].

    If above is not doable I have an idea: How about adding virtual folders?

    Virtual folders would be just "virtual" containers where you could put different kind of resources types. Later on it would be very easy to select data from the db based on my virtual folders. It would also make it a bit easier when building complex menus, where you only want to output "real pages". This would not just make the coding easier, it would probably make the manager-browser easier to work with from a client perspective.

    Cheers // eyeMac
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      There is a configuration setting to use "friendly alias paths" which does what you are experiencing. If this is turned off then only the domain/alias will be used in the URL.
        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
        • 36710
        • 3 Posts
        Quote from: sottwell at May 08, 2011, 02:12 PM

        There is a configuration setting to use "friendly alias paths" which does what you are experiencing. If this is turned off then only the domain/alias will be used in the URL.

        Hi,

        Thanks for your suggestion.

        I tried it out, but soon discovered another problem. Every link on your website would look like this "domain.com/page", even if it was a third level subpage. That is out of the question in my opinion.

        Anyone else?
          • 33997
          • 150 Posts
          Do you really mind that the page is showing up as a root level document when it is a third level sub-page? I don’t see how that makes a difference to anything...

          My opinions aside grin, you have a few options.

          1. Using the ’friendly alias paths’ setting, you can either have paths, which means EVERY folder will show up in the directory structure. This won’t work if you only want some folders to show up and others to not. One fix would be to put your root-level documents at the root, 2nd level docs at second level, 3rd @3rd, etc.

          2. Turning off the ’friendly alias paths’ setting gets rid of all directory structure. The end user will not see ANY structure, so every page, no matter how deep, will have a URL such as mydomain.com/this-is-a-3rd-level-page.html (you can turn on suffixes in the same area of your site configuration).

          3. An interesting fix from Susan, in reply to a question I asked. This fix should work, although I never tested it. Basically, it will stop MODX from stripping the forward slash from your alias field, allowing you to create pseudo-structure. You would turn OFF ’friendly alias paths’ and save third level docs with the following in the alias box: ’level1/level2/page-name’ and that should (theoretically) give you a URL such as mydomain.com/level1/level2/page-name.html.
          View thread here: http://modxcms.com/forums/index.php/topic,63939.msg361861.html#msg361861
            "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
            • 33997
            • 150 Posts
            Oh, also, even when ’friendly alias paths’ is turned off, if you have breadcrumbs turned on, people will still be able to see the site structure even if the 3rd level page appears to be residing in the root.

            Example:

            URL: www.mydomain.com/my-level3-page-name.html
            Breadcrumbs: Home > Level 1 > Level 2 > Level 3 > Page Name
              "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
              • 20358
              • 10 Posts
              I was pondering the "virtual folder" idea when I was first dealing with Wayfinder. I wanted to have certain resources categorized under container folders, but for Wayfinder to treat those resources as if they were in the first level of my hierarchy. A flag/checkbox for virtual folders would be a cool way to handle this. Then you could choose which parents are true parents, vs. just being a category container.

              Swill
                • 33997
                • 150 Posts
                Quote from: Mr. at May 09, 2011, 05:09 PM

                I was pondering the "virtual folder" idea when I was first dealing with Wayfinder. I wanted to have certain resources categorized under container folders, but for Wayfinder to treat those resources as if they were in the first level of my hierarchy. A flag/checkbox for virtual folders would be a cool way to handle this. Then you could choose which parents are true parents, vs. just being a category container.

                Swill

                That would be neat. Wouldn’t that be hard to implement though?
                  "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
                  • 20358
                  • 10 Posts
                  Well, I’m more of a designer than a coder, so I can’t really speak to the difficulty level of implementing such a feature. But! I was pondering this a bit more and it dawned on me that all we’re really talking about here (assuming we’re on the same page) is a way to "categorize" resources without affecting the hierarchy. We already have the ability to apply categories to everything else (templates, TVs, chunks, snippets), so one could assume that developing a method to categorize resources would at least be easier than if we didn’t already have the existing code/tables in place smiley

                  Swill