We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30960
    • 12 Posts
    I have made a plugin Cascading Templates (en) (ja)
    which enables layered(cascading) template structure. (BSD License)

    Suppose the document has a template "t.outer.inner",
    1) The plugin puts "t.outer.inner" into [*content*] of "t.outer" (if exists).
    2) In the same way, "t.outer" (now contains "t.outer.inner") into "t"
    (And so on in any deeper level.)
    3) Finally, MODx merges "t" (contains "t" which contains "t.outer.inner") with the document content.

    This plugin might be useful when you have a structure like below.
    Page Frame template for common part of the entire web site.
    Customized Template For Content Type A template, which may contain special navigation for content type A.
    Customized Template For Content Type B template, which may have an image area specific for content type B.
    etc.

    If anyone noticed some bugs, please point it to me.

    Thanks.
      • 25663 MODX Staff
      • 12,272 Posts
      How does this differ from using TVs and chunks?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 30960
        • 12 Posts
        In short terms, this plugin preserves conservativeness (easiness of maintenance) and legibility.
        With TVs (set some default value, and put [*tv...*] in the document content), legibility is a bit spoiled.
        With chuks, usually the outer part of the page might have begin-tags and end-tags, so making them apart may decline the conservativeness.
        Chunks can include [*content*] but I think there is no existing method to wrap up some MODx objects.
        (If there are any, please tell me.. smiley)