We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12372
    • 44 Posts
    I am migrating from Evo to Revo, and have hit another stumbling block. I promise I’ve searched for ages in the forums, and played with various settings, but with no joy.

    Basically I want paths to be root relative. So pretty much for every link to begin with /

    However all links on my site are just relative, so are thus failing.

    I know I had this issue with TinyMCE with Evo, and had to set it to root relative.

    But my problem is not just isolated to MCE - all the Wayfinder navigation is like this too. So it made me wonder if there’s another setting I’m missing.

    Any help much appreciated!

    Thanks
    • I don’t think there’s a way to do this currently, but it’s definitely worth a feature request imo.. Could simply be a system setting toggling something in the makeUrl function.

      The easiest solution is to add a <base href="[[!++site_url]]"> to your html header.

        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.
        • 12372
        • 44 Posts
        Thanks Mark.

        Well I decided I could just add a leading slash in the wayfinder tpls and that fixed that. However TinyMCE is being a right pain! I set it to rootrelative, but now I just get "/assets/components/tinymce/" before any URLs. huh

        You know your option is easiest. I could save myself so much time. So why have I not done it? I have vague memories of some drawback on it... but I can’t remember what. Or maybe I’m just giving base href a hard time based upon a hunch from maybe 10 years ago.

        • I use base href all the time.. haven’t figured out any problems with it.
            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.
            • 12372
            • 44 Posts
            Thanks. I think sometimes I just like to make extra work for myself! Not sure why I have that perception about base href, but time to drop it and move on with things.
              • 20400
              • 37 Posts
              In case there is anyone, like me, who is still having problems with this, you need to change the tiny.base_url to ’/’ . That overrides the ’/asses/components/tinymce’ as the base.

              Then change tiny.path_options to ’rootrelative’.
                • 25506
                • 6 Posts
                Thanks Michael (mregan), that's a great tip. I can't see why this isn't set as the default - non-root relative URIs are too fragile. The moment you want to use your resource outside the root, your links are broken, unless you use the <base> tag, which can have undesirable or unexpected side effects.