We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    I’ve been struggling to find an answer in the wiki and the forums to make sure I’m not just repeating something. Turns out I am, but there wasn’t a satisfactory answer and the thread is two years old, so I thought I’d ask again.

    The situation is that I’ve got a website for an ISP where the phone technicians and sales department often refer people to URLs over the phone. This makes deeply nested or very long URLs very difficult to deal with, especially for frequently used resources. However, for the purpose of keeping things organized and not having absolutely everything as a flat structure (which would result in long filenames or aliases), there is still a need for some hierarchy.

    Example structure:

    Products
    --Hosting
    ----Web
    ----Email
    --Connections
    ----DSL
    ----Fiber
    Support
    --Hosting
    ----Web
    ----Email
    --Connections
    ----DSL
    ----Fiber

    Now, there’s certainly pages under these, and we’re trying to keep it no deeper than that, but there will be the occasional exception. The main problem with "Use friendly alias path" is that you can get some fairly ruthless URLs to repeat over the phone to customers, like:

    site.com/hosting/web/ultimate/features

    "The page is ’site dot com slash.. no, no forward slash - the one under the question mark, good... products slash hosting slash web slash ultimate slash features..."

    Ideally, we would be able to refer to something like: site.com/hosting/ultimate while still maintaining a hierarchal structure. This would mean that we also have a proper breadcrumb trail established so people can still know where within the site they are. e.g. site.com/hosting/ultimate would jump you into a page with a breadcrumb that looked like Home > Products > Hosting > Web > Ultimate

    Normally, I’d accomplish this with a bunch of rewrites, but there’s a number of contributors likely in the future, and ease of use if the primary goal. As you can see, we’ve made paired Product and Support pages so navigation is more consistent, so there’s already a need to use "Allow duplicate aliases" within MODx. This requires "Use friendly alias path", which writes out the entire nested path.

    I’ve tried several experiments with different combinations of friendly urls and weblinks in different variations, and none are satisfactory. The only solution I see right now is a bunch of Rewrites to the most commonly linked sections.

    Is there a "Pointer" type function that will be easy enough for other contributors to add these Rewrites to the .htaccess? Any other ideas?
      • 33337
      • 3,975 Posts
      I would use weblinks, i.e. if i need to give the customer a link to hosting support, i will create the weblink in a root for it with alias: hs, i just tell him goto site.com/hs and MODx will take him to the right page.

      Just my 2 cents.
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 25307
        • 114 Posts
        Maybe subdomains could be a solution as far as easy direction of the customer. "Go to support dot domain name dot com" - at least no explanation of slashes that way.. =]
          • 27376
          • 576 Posts
          Weblinks are definitely the answer.

          When I ported my site over to MODx, I found myself using weblinks like crazy. I mostly had to use them as sort of "redirects" (or what I call ’backlinks’) so that links from the old site ported nicely to the new site.

          Since the pagetitle field of a weblink doesn’t display anywhere except in the manager, you can call them anything you want. I organize my weblinks in MODx by adding to their pagetitle either "(weblink)" or "(backlink)" and disabling the "show in menu". Individual results may vary, but there’s my two cents.

          Enjoy!
            • 34162
            • 1 Posts
            Hmm, it seems that nesting weblinks wasn’t something I had tried. I thought that because they are to be pointers (e.g. symlinks) to real documents, they wouldn’t be able to contain other content. However, creating a set of nested weblinks to represent an abbreviated path does work.

            e.g. If the site root (in MODx) is configured like so:

            Products
            --Hosting
            ----Web
            ------Basic
            ------Limitless
            ----Email
            Hosting (weblink to Products>Hosting)
            --Basic (weblink to Products>Hosting>Web>Basic)
            --Limitless (weblink to Products>Hosting>Web>Limitless)

            ...lets you use a path of site.com/hosting/basic, which jumps you past two additional levels to the correct url, including appropriate breadcrumbs.

            Even though the answer was not directly specified here, the repeated suggestion of weblinks made me take another look at how I was thinking about the way MODx was actually working.

            Thanks for the help.
              • 27376
              • 576 Posts
              Quote from: deadguy at Jun 03, 2007, 04:17 AM

              Hmm, it seems that nesting weblinks wasn’t something I had tried. I thought that because they are to be pointers (e.g. symlinks) to real documents, they wouldn’t be able to contain other content. However, creating a set of nested weblinks to represent an abbreviated path does work.
              The MODx parser uses HTTP-301 redirects, so they could be considered symlinks if you were to translate the terminology to unix wink