We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22815
    • 1,097 Posts
    To contribute another explanation of Template Variables:
    TVs are like per-document chunks (the template determines whether they are available to the document). What makes them sound complicated is that you can configure the type of value, the range of values, the source of the values, how the value is represented, and what it defaults to (or inherits from). And the way you can configure these involves manager settings, code, bindings and widgets. But you don’t actually have to do any of these fancy things, you could just have a basic text field.

    Vanessa, you have a specific requirement for chunks to be editable on the frontend. Presently this is not possible "out-of-the-box". Lets run through the alternatives.

    1) Wait for someone to add it into QuickEdit.

    2) Wait for someone to write a ChunkEdit snippet.

    3) Use the TV value from another document. A snippet called getField lets you load the TV from another page. On one site, I have a page available to the client which I’ve set as the "redirect on manager login" page. This has links to her custom Add News page etc, but also the only page with a particular template which has TVs available. These every-document fields are thus on the QuickEdit menu of that page, and the client doesn’t know or care that it’s not a chunk. (Yes, it could be on every page, but the trouble with that is that if you edit it on a subpage by mistake, it doesn’t affect parent pages).

    4) Use the document content from another document along similar lines to the above.

    For a newbie, you can see that MODx is developing in many ways thanks to the dev team and "early adopters" who *are* code-savvy. There’s the MODx core itself, there’s the ever-increasing repository of add-in solutions, and there’s the expanding knowledge of people on this forum.
      No, I don't know what OpenGeek's saying half the time either.
      MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
      Forum: Where to post threads about add-ons | Forum Rules
      Like MODx? donate (and/or share your resources)
      Like me? See my Amazon wishlist
      MODx "Most Promising CMS" - so appropriate!
      • 34017
      • 898 Posts
      Vanessa,

      Here is an example of a TV. Let’s say your client wants to create pages for a product catalog. So you have designed a layout like so:

      (This is a table)

      | Product Name | Product Price |
      _______________________________
      | Main Image | Product Description |
      ________________________________
      | More Images | Paypal Buy Now |

      <tr>
      <td>Product Name</td>
      <td>Product Price</td>
      </tr>
      
      <tr>
      <td>Main Image</td>
      <td>Product Description</td>
      </tr>
      
      <tr>
      <td>More Images</td>
      <td>Buy Now</td>
      </tr>
      


      Now in other CMS’s, you might have to teach your client to create that table.

      With MODx, you can replace these fields with TV’s like so:
      [*productname*] - Text TV
      [*productprice*] - Text TV
      [*productimage*] - Image TV
      [*productdescription*] - HTMLarea TV
      [*moreimages*] - URL TV
      [*buynow*] - Text TV

      Examples/HowTo - (Creating TV’s - http://modxcms.com/creating-a-template-variable.html)

      Then you replace your clients page with this:
      <tr>
      <td>[*productname*]</td>
      <td>[*productprice*]</td>
      </tr>
      
      <tr>
      <td>[*productimage*]</td>
      <td>[*productdescription*]</td>
      </tr>
      
      <tr>
      <td>[*moreimages*]</td>
      <td>[*buynow*]</td>
      </tr>
      


      This is one example of how you can make building pretty pages easy for your clients.

      I hope this made sense,
      Chuck
        Chuck the Trukk
        ProWebscape.com :: Nashville-WebDesign.com
        - - - - - - - -
        What are TV's? Here's some info below.
        http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
        http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
        • 16610
        • 634 Posts
        Good example Chuck! Someting like this case example should be added to "MODx tour for beginners".
          Mikko Lammi, Owner at Maagit
          • 6726
          • 7,075 Posts
          Yeah nice example Chuck !

          TVs can be such an abstract concept to a newcomer, as Ryan said, you have to "experience them" to really grab what they are all about. But this kind of example really gives a first impression of what might lie in there smiley

          About Exponent vs MODx, having tested Exponent I would say that MODx is really way more flexible, especially in terms of templating. Exponent strong suit is (and always has been) the "all frontend" editing and setting up capabilities (frankly, I find that it’s to the point of being overdone, the frontend editing is quite cluttered with Icons which to me weakens the whole concept). Now, as Ryan said, for someone who’s looking for something that will work "out-of-the-box", Exponent is better suited.

          As said above, the result and benefits are well worth the efforts grin
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l&#39;outil id