We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9849
    • 74 Posts
    I want the friendly alias path to not show containers which are hidden from menu.

    So instead of http://www.example.com/section/subsection/content.html
    what I want is http://www.example.com/section/content.html

    Possible?
      • 27708 MODX Staff
      • 2,502 Posts
      I just realized what you are asking. Not sure if this is possible. It may require a plugin or a feature request to bugs.modx.com
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 22303 MODX Staff
        • 10,725 Posts
        This is not possible, nor would it make any sense; maybe if you wanted it to not include parents that were unpublished it would be more logical. However, in the future you may be able to specify a complete URL segment per Resource and turn friendly_alias_paths off completely, so you can control exactly what each URL is manually.
          • 10075
          • 20 Posts
          franklinveaux Reply #4, 16 years ago
          Sadly, this is a dealbreaker for me that prevents me from upgrading from MODx Evo to MODx Revo.

          My site has many containers. These containers are there largely just so that the menus (built using Wayfinder) act the way I want. I have, menus that look like

          CATEGORY
          Subcategory1
          Subcategory2
          Subcategory3

          DIFFERENT CATEGORY
          differentSubcategory1
          differentSubcategory2
          differentSubcategory3

          It is absolutely essential, and non-negotiable, that the site URL structure MUST be

          www.sitename.com/Subcategory1.html
          www.sitename.com/Subcategory2.html
          www.sitename.com/Subcategory3.html
          www.sitename.com/differentSubcategory1.html
          www.sitename.com/differentSubcategory2.html
          www.sitename.com/differentSubcategory3.html

          The fact that Revo does not appear to permit this, and that it automatically forces resources that are within a container to have a path like

          www.sitename.com/CATEGORY/Subcategory1.html

          means that I absolutely, positively cannot use Revo. Is there something I’m missing that would allow me to upgrade to Revo and keep the current container/resource structure while also keeping the current URL structure?
            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: franklinveaux at Oct 25, 2010, 07:03 AM

            Sadly, this is a dealbreaker for me that prevents me from upgrading from MODx Evo to MODx Revo.

            My site has many containers. These containers are there largely just so that the menus (built using Wayfinder) act the way I want. I have, menus that look like

            CATEGORY
            Subcategory1
            Subcategory2
            Subcategory3

            DIFFERENT CATEGORY
            differentSubcategory1
            differentSubcategory2
            differentSubcategory3

            It is absolutely essential, and non-negotiable, that the site URL structure MUST be

            www.sitename.com/Subcategory1.html
            www.sitename.com/Subcategory2.html
            www.sitename.com/Subcategory3.html
            www.sitename.com/differentSubcategory1.html
            www.sitename.com/differentSubcategory2.html
            www.sitename.com/differentSubcategory3.html

            The fact that Revo does not appear to permit this, and that it automatically forces resources that are within a container to have a path like

            www.sitename.com/CATEGORY/Subcategory1.html

            means that I absolutely, positively cannot use Revo. Is there something I’m missing that would allow me to upgrade to Revo and keep the current container/resource structure while also keeping the current URL structure?
            I don’t understand, this functionality is basically the same as in Evolution, so not sure what you are talking about here.
              • 18373 ☆ A M B ☆
              • 3,141 Posts
              Mark Hamstra Reply #6, 16 years ago
              I’ve read something about this before in Evo. I think it used a plugin and modifications in the htaccess file.

              I’m pretty sure the same method would apply for Revo, too, perhaps just needing a few modifications.


              Why do you need that structure? Perhaps if you tell us more about the underlying reasoning and/or specifications of the project, we can try and think of a way that would work.
                Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                • 10075
                • 20 Posts
                franklinveaux Reply #7, 16 years ago
                Quote from: OpenGeek at Oct 25, 2010, 07:53 AM

                I don’t understand, this functionality is basically the same as in Evolution, so not sure what you are talking about here.

                It doesn’t seem to be. I’ve built sites in Evo and in Revo. In Evo, if I have a resource inside a container, and I specify an alias, Evo creates a path that looks like

                thewebsite.com/thealias.html

                In Revo, the behavior is different. If I create a resource inside a container, and I specify an alias, Revo creates a path that looks like

                thewebsite.com/thenameofthecontainer/thealias.html

                I can’t have that. If I am to upgrade this site from Evo to Revo, the URLs must not change.

                Quote from: Mark

                I’ve read something about this before in Evo. I think it used a plugin and modifications in the htaccess file.

                Neither Evo nor Revo require modifications to anything other than the .htaccess file in order to create paths with aliases; it’s just that the paths created by Revo are different fromthe paths created by Evo. If I am to upgrade to Revo, I need to be 100% sure that the paths will not change.

                (Note: I’m not talking about hidden containers here. I’m talking about containers which contain resources, but I do not want the name of the container in the URL to the resource.)

                Quote from: Mark

                Why do you need that structure? Perhaps if you tell us more about the underlying reasoning and/or specifications of the project, we can try and think of a way that would work.

                The Web site in question has been online for a little over 13 years now, and gets a high amount of traffic--about 15,000 unique visitors a day. The site started out in 1997 as simple static HTML, and has grown in that time to 257 pages, separated into different categories on different topics.

                When I decided toport the site to a CMS, I evaluated about a dozen different CMS packages. Two of the primary design intentions were (1) Each section needed to be able to have its own template; and (2) the URLs to the individual pages could not change. The latter requirement is because many of these pages have Google PageRanks that are quite high (3 or 4) and have hundreds or, in some cases, thousands of inbound links.

                I looked at about a dozen CMS packages, and whittled the list down to Joomla, MODx, Drupal, and Mambo. In installed Drupal, Joomla, and MODx to play with, and chose MODx because it was the sole package amongst all of them that met those two qualifications. (Drupal, for instance, allows arbitrary control over paths, for example, but after spending three days searching, I could not find a way in Drupal to say "This resource uses THIS template, that resource and this other resource get THAT template, and this resource here gets that template over there." I would have thought this was basic, elementary CMS functionality, but apparently not.)

                When Revo finally came out of beta, I was eager to upgrade, because one of the things I really want to do is to be able to pull content from the existing site and serve it up under a different domain name. So imagine my disappointment when I imported the site into Revo and saw that Revo’s URL structure had changed; containers are now treated in the URL structure like directories, and resources within a container are given a URL path that looks like /nameofcontainer/nameofresource.html.
                  • 18373 ☆ A M B ☆
                  • 3,141 Posts
                  Mark Hamstra Reply #8, 16 years ago
                  Ah, that explains the difference you’re aiming at.

                  I never experienced that difference, because I always used the "Use Friendly URL alias path" setting in Evolution, which would result in this chaining of aliases.


                  That is indeed something that has changed, and I’m not sure if there’s any simple way of creating it differently in Revo.

                  By unticking "container" in the Page Settings tab of a resource when it has children resources, you can force it to use the content type suffix.



                  A random thought I had earlier was contexts - you could use different contexts for the different categories which would get rid of the CATEGORY in the link.. but then there would need to be a way to distinguish between contexts, and I’m not really sure how that would work.. haven’t used contexts myself yet.
                    Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                    Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                    • 3749
                    • 24,544 Posts
                    Have you tried turning off friendly alias paths?
                      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
                      • 18373 ☆ A M B ☆
                      • 3,141 Posts
                      Am I overlooking that in the system settings?


                      Edit: funny. When normally browsing the system settings, it doesn’t appear in the Friend Urls section.. yet a search for "path" does show it. It seems to be on page 3 of the system settings.

                      (2.0.3-pl, I know I gotta update)
                        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.