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

    I created a template for a front page for a website, and QuickEdit works fine in that one. So I wanted to make a new template for the subpages, I copy-pasted everything from the frontpage template, and edited it slightly, into a new template.

    However, when I load a page with the new template, QuickEdit doesn’t work. It’s shown as a common unordered html list, it’s as if the styling isn’t applied at all. When I log out, the page is displayed fine, without the QuickEdit.

    I see no difference between the templates at all, they use the same template-folder, the same css file etc.

    Does anyone have a good idea for a solution? Thanks.
    • I suspect you have friendly alias paths turned on. Add the following to your header before your CSS and JS calls:
      <base href="[(site_url)]"></base>
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 28451
        • 46 Posts
        Thankyou very much, that was it.
          • 27448
          • 17 Posts
          This solution seems to force one to choose between having QuickEdit work and having relative links work in web pages. I’ve imported a site that contains maybe 1000 pages with lots of relative links. If I set the base href in the template to the site root, then this will break all those links.

          Is there another non-kludgy solution?
          • huh I use relative links all the time with the <base href...></base> set in the head, and never have any trouble with them.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 27448
              • 17 Posts
              Sure, you can use relative links if they’re relative to the right location. But if the original relative link is relative to the directory in which the file is found, then I can’t see a way to put a global <base href> in the template and have it work correctly for 1000 files that were in a multitude of different directories are now treated the same way because of using friendly URL paths.

              Am I missing something?