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

    I just set up a friends who is actually scared of computers up with a website powered by MODx. I have some areas of text on the site that are not in the main [*conent*] section and was thinking is would be nice if I could create a new document and call it "header about us text" or something so he could just open that document up in the manager and change that text when ever he wanted to. My problem is, lets say that the "header about us text" has doc id of 7. I don’t know what to put in my template code, so I can get the text in the "header about us text" to show up on the site. I know I could just make a chunk and do this, but like I said my friend is completely computer illiterate and I think that would be to much for him. I am using MODx 0.9.5 and I would appreciate any help.

    Thanks
      • 29181
      • 480 Posts
      I think your best bet would be to look into using a template variable. You can use a Rich Text Editor widget to change the text itself, pretty similar to how you would in Word or something like that.

      Check out http://www.modxcms.com/what-are-template-variables1.html and get back if you have any trouble setting one up.

      All the best,
      Taff
        Adrian Lawley: www.adrianlawley.com
        • 20993
        • 37 Posts
        Yeah, read through that, but I don’t really understand Template Variables that well or how I could use one to achieve what I am going for. I couldn’t just use some form of this: &tpl=`7` or something in my template code?
          • 11975
          • 2,542 Posts
          Hi

          you can get the content of another document from the TV using @BINDINGS

          In you case, you ll have to write the following line in your TV defaut value @DOCUMENT 7

          And to display the Tv in your template [*myTVname*]

          :-)
            Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
            • 8216
            • 15 Posts
            Quote from: bigimaginations at May 09, 2007, 04:32 PM

            Yeah, read through that, but I don’t really understand Template Variables that well or how I could use one to achieve what I am going for. I couldn’t just use some form of this: &tpl=`7` or something in my template code?

            Template Variables aren’t all that scary. Here’s how to add another content area.


            In the manager, go Resources > Manage Resources
            Click ’Template Variables’ Tab then ’New Template Variable’ link
            Give it a name - for instance ’SideBar’
            fill out the caption and description if you want (you can always edit it later)

            Select ’RichText’ as the Input Type

            Check the box beside the templates you want to use this on.
            Select the Document groups you want to allow access to the TV.

            It might be a good idea to create a new category - this just helps keeps things organised.

            Click Save

            Now to add it to your template just include [*SideBar*] in the html where you want it to appear.
            Surround it in any HTML - a DIV for example. For instance

            <div id="sidebar">
            [*SideBar*]
            </div><!-- sidebar -->

            Then you can format it with CSS.

            When you edit the page you will get another content box just like you do with the main content.

            Give it a go!
              modx ist rad
              • 20993
              • 37 Posts
              Thank You so much. That was what I was looking for. I really appreciate you taking the time to explain it to me. Now I will know forever and won’t be scared of all of that anymore.
                • 13331
                • 67 Posts
                Is it possible to use the QuickEdit on the [*SideBar*] ? ...like [*#SideBar*] ??
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Yes.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 7810
                    • 26 Posts
                    Quote from: Jachobsen at Jul 13, 2007, 06:31 PM

                    Is it possible to use the QuickEdit on the [*SideBar*] ? ...like [*#SideBar*] ??

                    I have done everything explaned above and I get the content of the other document parsed correctly, but when I try to QuickEdit it from front-end, the QuickEdit windows shows only the content from my created TV, for example: "@ DOCUMENT 16". I try both the Tag method, and HTML Method, but I get the same result. How should I solve this problem?
                      MODx is great! Thanks for great work!

                      Portfolio, mostly MODx: dbdizainas.lt
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      QuickEdit can only allow you to edit the actual value of the TV itself, not whatever it is bound to. It will display exactly the same thing you’d see if you were to edit it in the manager’s document editing page.
                        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