We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13825
    • 55 Posts
    Is there a way to combine two or more templates?

    I end up with two templates with identical html just because I need to assign different template variables to each.

    Is there an equivalent to @inherit template...?
      • 7231
      • 4,205 Posts
      That would be nice, or have a way to assign a template alias so that you could have only the TV for that section. As it is it often results in either multiple copies of the template or a long list of TVs.

      As a solution you could just put all the html in a chunk and then the template would only have a chunk rather then HTML. then when you need to update you would only need to update the chunk.

      I think it gets complicated with a complex design with many chunks and snippets already to have that in turn within another chunk. This to me sounds a bit cheesy since it undermines the entire template theory, but it might be acceptable to work like this. Don’t know how this would effect document parsing if at all.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]