We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33968
    • 863 Posts
    You could create a new system setting (not context setting) static_url, then make your asset links "dynamically absolute":
    <link href="[[++static_url]]css/style.css" rel="stylesheet" />
    <script src="[[++static_url]]js/scripts.js"></script>
    


    If you moved the MODX installation you would then only have to change one system setting.
      • 44007
      • 15 Posts
      Quote from: okyanet at Dec 31, 2013, 02:16 PM
      You could create a new system setting (not context setting) static_url, then make your asset links "dynamically absolute":
      <link href="[[++static_url]]css/style.css" rel="stylesheet">
      <script src="[[++static_url]]js/scripts.js"></script>
      


      If you moved the MODX installation you would then only have to change one system setting.

      Hi Lucas,

      Yes, I had considered this but that doesn't work for content included via the CMS, does it? It's fine for assets which I have some control over, such as those added via TVs but for images which are added as rich text, the site_url will be prefixed as usual. This may just be something I have to live with, short of adding exclusions to OG's router plugin.
        • 33968
        • 863 Posts
        If you're using TinyMCE, go to System Settings and search for "tiny". In the "General" section there are some base url and path setting options you can adjust. Not sure exactly which one you need, but hopefully one of them will help you out.
        • I'm using this solution (Jason's plugin) on a new site, actually it works fine for the internal pages but the "start_site" page causes a redirect loop.
          Did anybody have this problem?
          thanks
            TilliLab | MODX Ambassador
            website
            • 4172
            • 5,888 Posts
            you could also try this one
            http://modx.com/extras/package/xrouting

            not sure, if this will solve your issue
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
            • Thanks for your suggestion,
              it didn't solve my problem, which by the way is little changed...

              Internal pages still work fine, the "site_start" of the contexts now give me:

              403 - Permission Denied
              You do not have permission to retrieve the URL or link you requested, /subodolfer/it/

              May be my problem is related to the subfolder installation, but I read in the previous posts that it worked also in subdirectory...
                TilliLab | MODX Ambassador
                website