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

    Haven’t been able to figure this out via docum./forums/trial & error.

    Would like to have a template that can allow a variable number of Rich Text TVs (1 to n), depending on content editor wishes, per page.

    Use is for sidebar that has a variable number of visual content "boxes" with fairly complex HTML (to accommodate curved corners, bg images, etc.). Semantically naughty, but that’s another discussion.

    I can easily accommodate a single one by building the needed HTML into the template, then letting the user enter the sidebar box content via a rich text TV. I could, of course, have one template for each quantity of sidebar boxes, but my gut feeling about that is "yuck." I will do it if I have to.

    What I’d like to do is have a way for the user to say in the manager -- "for this page, I’ll need 3 of these boxes" and have a way then for the page edit screen (or substitute) to change the number of rich text TV entry boxes into which they can enter content, then the needed HTML container would be wrapped ’round each.

    I’m sure there’s a way, but I’m not seeing it. Ideas?

    Thanks
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      No, there’s no way to do that. Template Variables are connected to templates, and all documents using that template will show all of the TVs attached to that template.
        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