We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24629
    • 370 Posts
    Hi,

    i have a template the spits out the right XML to use in my ajaxPgae.
    When my client adds a new page he can choose to the right template (that generates XML).
    but after that they also have to set the Content Type for that page manually to text/xml.. they keep screwing that up.

    Can i set the Content Type to the template somehow? anyway its also more logical i think to set the Content Type in the template instead of in the page.

    tnx
      • 22303 MODX Staff
      • 10,725 Posts
      This is something I’ve been considering for a while now, and my current plan is to move from storing Content type per Resource (also known as Page or Document) to per Element (also known as Templates, Chunks, TV’s, Snippets, etc.) when there is no actual "content" stored per Resource.

      This should occur in MODx Revolution 2.1 (the first minor version release after 2.0) when the content field (along with pagetitle, longtitle, introtext, etc.) will simply become an Element that can be directly related to a Resource without a specific Template relationship. At that point, Templates and Chunks and TV’s will all essentially become basic Content Elements where any of them can be attached to the Resource as a Template would, plus you would be able to attach a Snippet directly, as well. Then, Content Type will be directly associated with Elements (maybe twice, to describe input content type and output content type), and we can entertain the possibility of providing custom content transformers that can convert certain types into others automatically.