We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37521 ☆ A M B ☆
    • 30 Posts
    How can I define the path to my custom images, css and js files now with Media Source? Creating [[*path]] TV and inserting it in all paths as before (href="[[*path]]css/style.css") or may be something easier?
      • 22303 MODX Staff
      • 10,725 Posts
      Can you provide more information about what you are asking specifically?
        • 37521 ☆ A M B ☆
        • 30 Posts
        I have css, js and image files in folders assets/templates/css, assets/templates/js and assets/templates/img. What is the simplier way to write them in modx chunk? For example, <img src="assets/templates/img/image.png"> define as something like <img src="{Media Source path}image.png">. How to specify this path in chunk if I have Media Source for assets/templates/img?
          • 28215
          • 4,149 Posts
          You can just add a System Setting that has the path in it, and then just do:

          <img src="[[++keyofsetting]]image.png" alt="" />


          You don't necessarily need a Media Source for that.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com