We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16895
    • 87 Posts
    Basically, the idea is to have a new option or input type when setting up a TV which would allow multiple content areas to be added to that TV.

    To explain, let’s call this new type of TV an ’expanding TV’. I set up a template and assign a new expanding rich text TV, called ’content_blocks’, to it. A user now creates a new resource and sets it to this template. Looking at the content_blocks TV input area they see one rich textarea and a button that says ’Add more’. They click this twice to end up with three rich textareas within that single TV. Now they create another resource, but this time they want four textareas inside that TV, so they click the button three times.

    This would be immensely useful to solve the problem of dynamic multiple content areas. You could set the widget of content_blocks to Generic tag (div) and get this output:
    <div><p>Block one</p></div>
    <div><p>Block two</p></div>
    <div><p>Block three</p></div>
    


    From only this input:
    In the first textarea of content_blocks:
    <p>Block one</p>

    In the second texarea of content_blocks:
    <p>Block two</p>

    In the third texarea of content_blocks:
    <p>Block three</p>


    The upshot of this is that it allows users to add an unlimited number of simultaneously editable and complex structures (in this case, the <div>s) to the page *without ever having to look at or risk breaking said complex structure*.

    At the moment I believe the closest approximation of this feature is using children to store the different blocks of content and Ditto to show them on the parent page (as I’ve documented at http://wiki.modxcms.com/index.php/Multiple_content_areas).

    I apologise if I have made your brain hurt, and hope that someone can explain this better than me. I’m repeatedly amazed by MODx’s flexibility, so I wouldn’t be that surprised if I was told that this was already possible.
      • 9849
      • 74 Posts
      This sound great and I think it can be accomplished using custom TV types in Revolution.
        • 26931
        • 2,314 Posts
        maybe with custom TVs for Evo, too: http://www.mapledesign.co.uk/projects/modx-tvs/
          • 16895
          • 87 Posts
          S’pose I’ll have to learn PHP now smiley