We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I would like to be able to use Media Sources for static resources as easily as they can be used for image TVs.
      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
      • 50210
      • 1 Posts
      Had the same problem recently and managed to solve it simply by changing resource's template to "empty". I Thought that static resources doesn't care about template field but it appears that they do.

      To ensure your file is transmitted correctly, you should use the (empty) template. The static resource becomes a link to the file as long as you use this template. If you need to add some meta information to the resource via some Template Variables, and you create your own 'empty' template to enable this, then you must set the contents of the template to [[*content]] before it will work correctly.

      https://docs.modx.com/revolution/2.x/making-sites-with-modx/structuring-your-site/resources/static-resource [ed. note: screenager24 last edited this post 5 years, 7 months ago.]
      • Interesting old thread, and something worth noting. When I input just "static" into the docs this page is one of few, but needs to emphasize for the single most inadvertent mistake made when first using static resources.

        One sets all the stuff that's obvious for a new resource type, but forget to change the template since it's defaulted to either id 1 or whatever we set it to. Save, then it doesn't work and after all kinds of searches and questions (i.e. TIME), the obvious is that it's not set to empty.

        This should be more clear now.
        https://docs.modx.com/revolution/2.x/making-sites-with-modx/structuring-your-site/resources/static-resource

          Frogabog- MODX Websites in Portland Oregon
          "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
          Having server issues? These guys have MODX Hosting perfected - SkyToaster
          • 5430
          • 247 Posts
          Quote from: screenager24 at Sep 19, 2018, 10:57 AM
          Had the same problem recently and managed to solve it simply by changing resource's template to "empty". I Thought that static resources doesn't care about template field but it appears that they do.

          To ensure your file is transmitted correctly, you should use the (empty) template. The static resource becomes a link to the file as long as you use this template. If you need to add some meta information to the resource via some Template Variables, and you create your own 'empty' template to enable this, then you must set the contents of the template to [[*content]] before it will work correctly.

          https://docs.modx.com/revolution/2.x/making-sites-with-modx/structuring-your-site/resources/static-resource

          Damn it! Just started a new thread on this before I saw this post. Fixed it instantly. You're my hero.