We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3232
    • 380 Posts
    I am using modx .95 and TinyMCE and it seems when I add a link to a local file or and image the url is always relative and will break once viewed with friendly alias...

    example:

    the links will be "assets/files/commentary.mp3" but when the page renders, it will render as "/parent/child/assets/files/commentary.mp3" which is not were the file is located.

    Is it possible that all files/images (including template variables) can be referenced from the root? Or is there a setting that I am missing that will refrence the relative link from the root?

    Thanks
    Brian



      • 25663 MODX Staff
      • 12,272 Posts
      There’s a configuration setting in the TinyMCE plugin for paths: Resources > Manage Resources > Plugins tab. You’d have to change all existing links to get that to work though. Based on that, adding something along the line of the following near the top of your header should fix any issues:
              <base href="http://www.your-site.com/" />

        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 3232
        • 380 Posts
        thank you for such a quick response! the <base href... /> worked like a charm.