We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43432
    • 19 Posts
    MODX Revolution 2.2.6-pl (traditional)

    currenlty have a MODx website setup, and I am wondering if it's proper to have my links look like this (And by that I mean my resource alias):

    myurl.com/help/configuration/basics.html
    Putting the slash in the friendly URL like that... is it a bad practice? My main problem is that this http://rtfm.modx.com/display/ADDON/Breadcrumbs plugin seems to no longer work properly... sad I want to have this breadcrumb plugin operational again, if someone would mind helping me.

    First of all, I am manually adding in the "/" with the aliases of the pages, not sure if there's a way to make it automatically organize it in folders corresponding to it's parent page

    The Error:

    When say using the breadcrumb to link to a page that's myurl.com/code/landing.html and the current page is myurl.com/help/configuration/basics.html, it will then redirect you to a link that doesnt exist, that looks like this:

    myurl.com/help/configuration/code/landing.html

    As you can see, it is appending the latter portion of the new page's url, but it is not properly removing the URL of the current page, as it only removes the current URL up to the '/' slash.... I have tested by removing the '/' in a friendly URL, and it works perfectly, like a breeze.

    Does anyone know how to fix this or get around it? Possibly a way to make it so that instead of doing it's current "remove" and "append" thing, I can change breadcrumbs.class.php to take the value of the links as if I had clicked the link with the "view" button on the MODx manager? I'm not an expert at php, and it is a must for this to work. Or are there other alternatives to creating the " / " effect in my links, rather than just putting it in the resource alias? (As I want the site to follow a logical, readable, order)

    Thanks!

    This question has been answered by DasItsch. See the first response.

    • discuss.answer
      • 6629
      • 60 Posts
      How are your documents organized in the tree?
      If you put them into folders which represent the structure you are creating manually, MODX will save you a lot of time =)

      web
      - help (folder)
      --- configuration (folder)
      ----- basics (document)
      - code (folder)
      --- landing (document)
      
      

      Additionally you have to add the base-tag to the head section of yout template:
      <base href="[[++site_url]]" />

      After setting use_alias_path to "yes" in the furls-configuration, MODX will output the full document-path when rendering links.
        • 40045
        • 534 Posts
        Or just try the BreadCrumb Extra (instead of Breadcrumbs) it's better in my opinion =)
          • 43432
          • 19 Posts

          Quote from: DasItsch at Apr 19, 2013, 03:18 AM
          How are your documents organized in the tree?
          If you put them into folders which represent the structure you are creating manually, MODX will save you a lot of time =)

          web
          - help (folder)
          --- configuration (folder)
          ----- basics (document)
          - code (folder)
          --- landing (document)
          
          

          Additionally you have to add the base-tag to the head section of yout template:
          <base href="[[++site_url]]">

          After setting use_alias_path to "yes" in the furls-configuration, MODX will output the full document-path when rendering links.

          The "base" href thing worked like a charm! Thank you!

          Also, how do I create 'folders', or are those just documents? I've got some in my resources file tree, but they don't automatically make the /folder/page1.html type of page structure! D:
            • 22840
            • 1,572 Posts
            it will become a container ( folder ) when you add a resource under it or when you tick container in the settings for that document
              • 6629
              • 60 Posts
              Quote from: muffinjello at Apr 19, 2013, 08:56 AM

              Also, how do I create 'folders', or are those just documents? I've got some in my resources file tree, but they don't automatically make the /folder/page1.html type of page structure! D:

              In "System Settings -> Friendly URLs" set "Use friendly alias path" to "yes". Then your folders will be included in URLs generated by MODX.
                • 40045
                • 534 Posts
                Quote from: paulp at Apr 19, 2013, 10:40 AM
                it will become a container ( folder ) when you add a resource under it or when you tick container in the settings for that document

                This seems not to be correct as I experienced it...when you just drag a resource into another it seems as it get's a container, but the container checkbox stays unchecked, so that made me some headache recently =)
                  • 22840
                  • 1,572 Posts
                  Quote from: exside at Apr 19, 2013, 02:59 PM
                  Quote from: paulp at Apr 19, 2013, 10:40 AM
                  it will become a container ( folder ) when you add a resource under it or when you tick container in the settings for that document

                  This seems not to be correct as I experienced it...when you just drag a resource into another it seems as it get's a container, but the container checkbox stays unchecked, so that made me some headache recently =)

                  Sounds like a bug, can you log it so it gets addressed.

                  http://tracker.modx.com/
                    • 43432
                    • 19 Posts
                    Quote from: DasItsch at Apr 19, 2013, 11:38 AM
                    Quote from: muffinjello at Apr 19, 2013, 08:56 AM

                    Also, how do I create 'folders', or are those just documents? I've got some in my resources file tree, but they don't automatically make the /folder/page1.html type of page structure! D:

                    In "System Settings -> Friendly URLs" set "Use friendly alias path" to "yes". Then your folders will be included in URLs generated by MODX.

                    I can't seem to find this setting... can you please help by taking a screenshot of it?

                    thanks!
                      • 40045
                      • 534 Posts
                      Quote from: paulp at Apr 20, 2013, 02:32 AM
                      Sounds like a bug, can you log it so it gets addressed.

                      it is, it is =)...see http://tracker.modx.com/issues/9635, bumped...

                      @muffinjello, it's called use_alias_path and you should find it under FURLs in the system settings