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

    I am working on a site that has 3 separate content boxes on the home page. I would like to make these for separate content items. I know i can use chunks to accomplish this but I do not want my client to have to edit chunks. Not only because they would have to know html, but because It is easier for them to just edit content items... with a WYSIWYG. So.... my question is, is there a way to use content items just like chunks? Seems like a simple answer but i have searched and am not really sure what i should be searching for. Built in function, snippet, etc... huh??

    thanks,
    Mike
      • 6726
      • 7,075 Posts
      What you’re looking for is... template variables a.k.a TVs

      You create your 3 TVs (in your case RichText TVs), assign them to the templates you want to use it with, then add the tags to your template : [*box1*], [*box2*], [*box3*] or whatever you want to name them.

      Then when a client edits a document using that template he’ll have 3 fields on top of the content field (if you don’t want to use it and have it displayed upon editing, use the HideEditor plugin). Your client just edits the fields and voilà, your content boxes are updated smiley

      No snippet, function or php needed... welcome to the power of MODx grin

      It’s just the basics, all you need to know to get started is in there :
      http://wiki.modxcms.com/index.php/Template_Variable

      You’ll get a grasp on default values, the different TV types, even @BINDINGS to tie to an external data source or script... enjoy !
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id