We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37042
    • 384 Posts
    I have a template stored on the sever as a Static Source and I'm tweaking and replacing via Dreamweaver as I tweak the html.

    Should I be using 'none' or 'filesystem' in the drop down for the Media Source for Static File option if the template is stored in domain.com/templates/my-innerpage-template.html

    Is there also a way to stop the template from being cached? Might be a browser cache issue but it takes a huge amount of refreshes to see the updated template applied to my resources. To the point where I am reverting to using non static resources.
      ...
    • In the case of Templates, you will have to clear the cache or avoid caching the Resource in order to see your changes from a static Template source on a Resource. Other Static Elements besides Templates will automatically refresh IF they are called non-cacheable, or you are not caching the Resource, but there is no way to prevent caching of the Template for a Resource if the Resource is cacheable, You can disable the cache_resource System Setting to turn off Resource caching globally for testing.

      As far as using the Media Source or not, it would be better to use the Media Source, so it is portable, i.e. the path is relative to the Media Source location, rather than hardcoded to an absolute path on your server. That said, by default the paths without a Media Source are relative to the "components_path" Setting (uses MODX_CORE_PATH . 'components/' by default) directory OR whatever you set as element_static_path in a System Setting (you would have to create this setting to override the path).