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

    can anyone show me how to tell ditto to use server relative paths?

    i want this: "news/pizza.html"

    to that "/news/pizza.html".

    i did a search over the forums, looked through the snippet-code - i guess i missed something. ;-)

    by the way ... my modxcms is setup for server-relative-paths already.

    thX for your help,
    marco
      • 18397
      • 3,250 Posts
      Change [~[+id+]~] in your tpl to /[~[+id+]~]
        • 23948
        • 15 Posts
        hi,

        how can we address this relative url issue with the pagination feature, since it generates the A tag for you?

        thanks.
          • 18397
          • 3,250 Posts
          MARKSVIRTUALDESK Reply #4, 20 years ago
          I can add urlType=relative or absolute. Would that help?
            • 23948
            • 15 Posts
            yep, I believe that would sort it out quite nicely!
              • 25663 MODX Staff
              • 12,272 Posts
              Why not make that part templatable, and the relative parts just become part of the template, not yet another config option?
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 18397
                • 3,250 Posts
                MARKSVIRTUALDESK Reply #7, 20 years ago
                If I make it a option it can affect everything as I use a function to generate all of the URL’s in Ditto. However, a template for the a would be impractical as it would cost more execution time than it is worth as several placeholders would need to be generated and replaced.
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Sounds like a plan then. Would it make sense to make everything relative by default?
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me