We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38593
    • 129 Posts
    We set up our install to append .htm to all urls, so as to maintain the same url structure as the previous static website. But now find that we also need to start producing some files in XML format.

    One option would be writing write some php and keep it in a directory outside of those controlled by MODX. But it would be nice to be able to use MODX's templating to format the xml replies AND send them with a .xml extension instead of .htm.

    Is there a way to override the extension on specific resources?

    This question has been answered by donshakespeare. See the first response.

      Pedalers Bicycle Tours my website forged with MODX
      vandergraaf-M static website generator for MODX
    • discuss.answer
      • 42562
      • 1,145 Posts
      Are you not looking for content types yoursite.com/manager/?a=system/contenttype

      Check here http://rtfm.modx.com/revolution/2.x/making-sites-with-modx/structuring-your-site/resources/content-types

      In the Revo 2.3+
      Content Menu
      Create a new Content Type and set these:
      name is XML
      file ext is .xml
      mime type is text/xml
      binary is no

      This option will be available for individual resources. In Settings.
        TinymceWrapper: Complete back/frontend content solution.
        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
        • 38593
        • 129 Posts
        Gosh darn and call me blind. I totally missed that "content type" under the "settings" panel.

        Thanks for helping an old blind man.
          Pedalers Bicycle Tours my website forged with MODX
          vandergraaf-M static website generator for MODX
          • 42562
          • 1,145 Posts
          You are welcome...MODx is a treasure trove at times...easy to miss things
            TinymceWrapper: Complete back/frontend content solution.
            Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
            5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
          • Actually, (at least for Revo 2.3.2) it comes with an XML type already.
              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