We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26422
    • 107 Posts
    I’m hoping my understanding of static resources is just a bit off cuz I can’t get them to work on a 2.0.7 site. My understanding is that you can create a resource tree entry that links directly to a file. You can place this entry into the site menu so that when a user clicks on the menu item it automatically launches the file (PDF, etc.).

    Here is what I am seeing happen - 2 issues. I create a Static Resource and call it PDF test. I choose my PDF document in the Static Resource field, issue #1 it doesn’t put the correct path and leaves off the / between folders. I choose it as a PDF content type from the page settings. When I hit save it creates an alias of pdf-test.

    Now when I hit the menu item the link is actually pdf-test.pdf instead of the actual PDF - issue #2.

    Any ideas on this?

    Crawford
      Crawford Paul

      Bridgecourt Web Design - Proudly using ModX CMS
      Serving Welland, Niagara, Ontario, Canada and the world!
      http://www.bridgecourt.com
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      As for #2:

      - Your alias is "pdf-test"
      - The content type being PDF gives it an extention of .pdf

      = pdf-test.pdf

      So I’d guess that expected behavior.


      #1 is still something I wonder about too wink
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 26422
        • 107 Posts
        Ok Another question about static resources. I’m trying to use an image Static Resource inside the content in TinyMCE. Here is the code that gets generated in Tiny

        <img style="float: left; margin-left: 10px; margin-right: 10px;" src="[[~554]]" alt="" width="400" />

        Thanks to help from Mark Hamstra this is displaying properly on the website. However in TinyMCE the image does not appear because it doesn’t understand how to display the MODX tag for the image.

        Does anyone have any ideas how I can get the image to be displayed inside Tiny?

        Thanks,
        Crawford
          Crawford Paul

          Bridgecourt Web Design - Proudly using ModX CMS
          Serving Welland, Niagara, Ontario, Canada and the world!
          http://www.bridgecourt.com