We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32614
    • 65 Posts
    I have different elements on a single page that are different from page to page, and I would like them to both be editable.

    ie. I need like [*content1*] and [*content2*] tags and so on, and there needs to be a way for users to enter/edit these [*content*]’s in the page editor.

    how do i architect that in modx?

    any ideas?

    btw, I’m a total newbie, and couldn’t PHP myself from a thin paper bag with holes in it, so please be gentle.

    thanks!
      "A great democracy must be progressive, or soon it shall cease to be great, and soon it shall cease to be a democracy." -Theodore Roosevelt
    • That’s what Template Variables are for. I’m still just fumbling my way around them myself, but the documentation here is pretty good; there are some very good examples.

      http://modxcms.com/template-variables.html
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 32614
        • 65 Posts
        thanks! i figured it must be something relatively easy, i mean you see sites that would have to have this feature all the time. now that i know what to look for, I’ll probably be able to figure it out. thanks for pointing me in the right direction!
          "A great democracy must be progressive, or soon it shall cease to be great, and soon it shall cease to be a democracy." -Theodore Roosevelt
          • 32614
          • 65 Posts
          so maybe this is an obvious question, but i was able to install two template variables, and they are both editable, exactly how i would have hoped. but it seems they are editable by anyone who goes to the site, not only to people who are logged into MODx. surely i am missing something obvious here? i only want the logged in user to be able to edit these fields.

          nothing fancy, these are just text fields. i’ll maybe want the ability to add photos and links, but nothing more complicated than that.

          please advise o wise, wise forum.
            "A great democracy must be progressive, or soon it shall cease to be great, and soon it shall cease to be a democracy." -Theodore Roosevelt
            • 7455
            • 2,204 Posts
            It looks to me that you chose a wiget that has a frontent input?
            the Template variables are using to elements 1 will show up in the editor the top part and the 2nd pard wil alow you to set the looks of the frondend result
            so if you would like to show a line of text than choose text for the top part and leave the bottom part as is and style it with css, ore you coukd use the widged to shape it into a tigger or a marque that shows up on the front side.

            I hope that this clarifies it a bit for you
              follow me on twitter: @dimmy01
            • Yep, sounds like you chose a Rich Text Editor widget. See http://modxcms.com/richtext-box-widget.html for a description of this widget. It’s for enabling an instance of FCKeditor or another WYSIWYG editor in the user interface. For editing in the manager with a WYSIWYG, you’ll simply choose the RichText input type, and leave the widget blank.
                • 12631
                • 5 Posts
                I’m new to MODx, though not to CMS. I’m still deciphering the schema and trying to understand limitations of the TV vs Content area. Since this is not elaborated much in the docs, any comments here would be welcome.

                Thanks
                • There really aren’t any limitations of TVs... in fact, they’re much more flexible due to their ability to have @bindings, default values, input options and display controls. Future versions of MODx will migrate [*content*] to be just another TV.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 12631
                    • 5 Posts
                    Ah, very helpful, especially to understand the future direction. I was hoping you’d say something like that. I guess I’ll have to change my bumpersticker, the one that says "Kill Your TV". Long live the TV!
                    • Consider the [*content*] to be just a TV with a default name and content; you can put it wherever you want and even have it more than once in a document if you want (although not to much purpose). Some of the others are [*id*], [*pagetitle*], [*longtitle*] and [*introtext*].

                      Custom TV are just about unlimited, however. I regularly use them for sidebars. In my template I’ll just have the basic HTML tags for the main <div> containers layout and in the left/right sidebar containers I’ll put [*leftcontent*]/[*rightcontent*] TV tags, each with default content such as the WebLogin snippet, a menu snippet, etc. Then when I edit each page, I can edit not only its main content but also the content to appear in its sidebars. I can leave the default, or add or replace whatever I want for that page.

                      I usually have each block in a chunk with its own HTML layout and the intended content/snippet/TV or whatever. Then it’s easy to just add the {{ChunkName}} tags in my sidebar TV and style them all consistantly using class names, like this: http://modxcms.com/simple-rounded-corner-css-boxes.html.

                      And I haven’t had a TV for years, but then I also haven’t had a car for years either...but I do have (at the moment) three working computers.
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org