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

    I have a project with a folder structure similar to the following:

    domain.com/file1
    domain.com/file2
    domain.com/file2/file2a
    domain.com/file2/file2b
    domain.com/file3


    File2 has a getResources call to list the child pages with a tpl that includes the following line:

    <a href="[[~[[+id]]]]">[[+pagetitle]]</a>


    In Firefox and Chrome, the generated URL is domain.com/file2a.html (without file2) and it works. In IE, the generated URL is domain.com/file2/file2a.html and it doesn't work. That seems back-to-front to me. Anyway - I thought the URL would have been generated at server side! Perhaps something to do with friendly URLs? I've had a good look in the forums but can't find anything - any assistance would be much appreciated.
      • 42710
      • 14 Posts
      I'm still not sure what's going on, but I changed the relative link in the tpl to absolute and it works for all browsers:
      <a href="[[~[[+id]]? &scheme=`full`]]">[[+pagetitle]]</a>

      The URL shown is, unfortunately, omitting the parent folder (file) name, and appears like this:
      domain.com/file2a.html

      Rather than this:
      domain.com/file2/file2a.html

      Not as urgent now that the browsers are all loading the pages, but if anyone could give me a clue as to what's going on, or any suggestions to get the parent asset in the URL I'd really appreciate it!
        • 37523
        • 141 Posts
        Just a thought have you enabled Use Friendly Alias Path (use_alias_path) within the Friendly URL System settings. That should show the full path to the resource.

        Thanks for the tip concerning &scheme=`full`. Never knew that one
          Glyn Szasz
          Sydney, Australia

          Happy to help (when can) and happy to learn

          If you are a Sydney based MODX developer would love to hear from you. Please contact me.
          • 10208 ☆ A M B ☆
          • 1,780 Posts
          Are these parents files or folders? And, are they resources or files?
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 42710
            • 14 Posts
            Quote from: glynszasz at Feb 04, 2013, 06:50 AM
            Just a thought have you enabled Use Friendly Alias Path (use_alias_path) within the Friendly URL System settings. That should show the full path to the resource.

            Brilliant - thank you for that! I saw that mentioned in another post but for some reason I couldn't find the option in the settings yesterday!

            Quote from: frogabog at Feb 04, 2013, 11:09 AM
            Are these parents files or folders? And, are they resources or files?

            Parent files, they are all resources. Sorry, I should have made that clear.

            Now everything is working fine with absolute paths, but if I change back to relative paths IE develops links doubling the subfolder resource name:

            domain.com/file2/file2/file2a.html


            Which obviously doesn't work. Chrome and FF continue to behave themselves.