We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7690
    • 166 Posts
    Usually when i use a CMS, i just typ text in 1 content div.
    But what now if you devide the content div in 3 other divs. And an other page, 2 divs and an other page 3 divs but with different css classes.
    In the modx editor, its very difficult to edit this, because you can’t see the divs. And when you typ in the normal view, the divs might get screwed up.
    So the solution is to look in the html.
    This is for me no problem. But what if a customer wants to make a change?
    Like this website: www.web-training.nl
    The whole content must be editable. What is the most smart way to make this for the customer as easy as possible?
      • 21257 MODX Staff
      • 730 Posts
      It depends on how many variations of pages you have. If you just have a few, like the examples you mentioned, a simple approach would be to create a separate template for each case, and use Template Variables (TV) for the second and third content areas. Just create a couple of Rich Text TVs, and assign them to the templates that need the additional content areas. For the sake of this post, let’s say you named them "Content2" and "Content3". Then in your templates, you can put them wherever you want.
      For example:
      ...
      <div class="classA">
      [*content*] <!-- the regular rich text content -->
      </div>
      <div class="classB">
      [*Content2*]
      </div>
      <div class="classA">
      [*Content3*]
      </div>
      ...
      


      The only difficult part is if you really want the styles of the div wrappers to show up in the rich text editor while your client is editing. That would be much more complicated, I think. But if you don’t have that requirement, this solution will allow your client to have separate rich text areas to work with on any given template.
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell