We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • You do not have to use the [[*content]] tag in any of your templates. The content field is simply... a TV! It's entirely optional. The content field just happens to live in the main tab when a resource is viewed while the other TVs live in the TV tab. We regularly rely on the template variables tab for ALL the content of any given page, and editors soon learn that they can make changes to the pages without messing up any of the layout easily by ignoring the content field. In fact, I spoke to one client today who had no idea that she could use the content field at all. She always uses the template variables. We'd love her to use the content field, cuz we made it available in the template, actually.

    See, when you use a "text" TV, you can style it and tag it in your template any way you want and your clients can't possibly mess it up unless they go entering html into the text field. None really do, they just type their words and it appears magically styled in just the right spot when they preview the page. The caption for the TV allows for instructions for filling out any TV, so go wild with your "instructions" as needed. In your template, just wrap the tv call with html of choice and you're done. Never to worry again about styles and markup being messed with. MODX makes this all so very simple once you get the hang of it.

    If you want default content in these TVs, just enter your default content when you create the TV. It will place that default content into the page whenever alternate content isn't entered. If it's replaced, even with a space the default will disappear.

    One sneaky trick is to collapse the content field on your resources, which will actually leave it defaulted as collapsed when the next user views the resource (at least at last check it did). Then no one is confused, you direct your clients to the TV tab and off they go creating content that looks perfect :~} You can also disable the Rich Text Editor for any of your resources, or for the entire site. In Revolution TV RTE and the content field RTE setting (in System Settings) are separate, EDIT: OK, not true - it's the elements that are separate settings. Although if you disable the rich text editor for the site in system settings, it does allow you to continue to use RTE in your template variables. So you can make rich text TVs and leave the content field html which will again... cause clients to become skeered and migrate to the TV tab and the TVs you told them to use. I've even used the content field for "instructions" telling editors that no content will show up on the page if they enter it in there.

    Hope that helps explain it a bit :~} [ed. note: frogabog last edited this post 10 years ago.]
      Frogabog- MODX Websites in Portland Oregon
      "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
      Having server issues? These guys have MODX Hosting perfected - SkyToaster
      • 4172
      • 5,888 Posts
      you have another option, where you could setup frontend - inline - editing and let the user just edit editable fields (TVs) inline.

      Possible, but a more advanced setup involved.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 46448
        • 98 Posts
        Frogabog, that does help - a lot - in my understanding of MODX's templating system functionality and flexibility.

        Having misunderstood the MODX template system, and having not yet explored TVs, I showed the client a test (using Evo), and what I had was basically an entire content section, all three columns, with all the HTML, and using a linked CSS file. I had them try copying the page, and then editing the copy (in rich text.)

        They saw their content, in columns, formatted properly, with the correct sizes in the columns (column 1 and 3 are fixed width, column 2 is liquid), with the correct background colors in the columns, with all the correct CSS for everything. Other than the fact that they did not see header + nav, and footer, they were basically "in-line" editing" a page. They loved it.

        They loved it.

        I've been trying to use workarounds to get back to that end user functionality, only protecting the html, so they can't mess it up. I think they are going to be a hard sell to use plain text in TV input fields, then "View", then edit some more, then view, then edit, then view... after seeing what they saw.

        So, I either give them that functionality (and if they break the HTML, they scrap the page and start over), try to talk them into using TVs the way they are designed, explaining that it protects them from one of their content creators making unusable pages... or I try to find out what Bruno 17 is thinking in his previous post. Inline editing.

        Dennis
          • 46448
          • 98 Posts
          Quote from: Bruno17 at Apr 23, 2014, 09:31 AM
          you have another option, where you could setup frontend - inline - editing and let the user just edit editable fields (TVs) inline.

          Possible, but a more advanced setup involved.
          Hi Bruno17,

          Can you explain more about this concept?

          Thanks!

          Dennis
          • Oh, the client doesn't have to use text fields only. The TVs can be rich text. It just makes it easier for everyone if you can wrap your content with the markup you want rather than them going nuts with tagging from the RTE. So you could still do something like this and give them RTE for the [[*someTextTV]] which would give them control of the way the main information is styled.

            <div class="yourLayoutClass">
            <a href="[[*linkTV]]" title="[[*titleTV]]"><h2>[[*titleTV]]</h2></a>
            <img class="yourLayoutImageClass" src="[[*imageTV]]" alt="[[*titleTV]]" title="[[*titleTV]]"/>
            [[*someTextTV]]
            </div>


            Insofar as editing from the front end, you'd still have to make the TVs for each area but they'd never log into the manager to edit. I'm not sure this is what you want to do either.

            If we let the clients go wild with the RTE, without limiting what they can do they'll invariably use heading tags for making bold text, or wrap what should be paragraphs with blockquotes just to get it indented. Also the amount of inline styles increases dramatically with RTE freedom and the end result can often be span upon span of spans with font declarations filling the page. None of this validates, nor is it good. Limiting the editors to text when the markup calls for specific things for specific and valid reasons is a good thing IMO.
              Frogabog- MODX Websites in Portland Oregon
              "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
              Having server issues? These guys have MODX Hosting perfected - SkyToaster