We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8439
    • 89 Posts
    I think the thing I don’t get about templates is how to provide a per-template default for [*content*].

    If I can do such a thing (and in rev1531 it’s not clear that you can) then I can specify complex layouts as default [*content*] to be filled in by the user when the document is created from the template.

    So, can I provide a per-template default for [*content*]? if so how?

    If not, my template will have to consist of loads of TVs

    Ed
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Use TVs. If you want three blocks in your "main content", then in the document content put three TVs, mainRight, mainCenter, mainLeft. Enclose the TV tags in <div> tags, position the divs with CSS. Then for each document the editor will have the three TV editing fields.

      Or, you could use the three TVs directly in your template, and just not use the [*content*] tags at all. Again, for each document, while the Document Content field would be empty, the three TV editing fields would be there.
        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
        • 22303 MODX Staff
        • 10,725 Posts
        Or you can use Ryan’s tip to populate the main content with a default value initially from http://modxcms.com/forums/index.php/topic,4111.msg30084.html#msg30084, where he uses a temporary TV with an @EVAL to set the value of each content area if it’s empty.