We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8010
    • 7 Posts
    dreamsare4living Reply #1, 17 years ago
    Hello,

    I am trying to build MODx Evolution as a backend behind this www.soepeldoordebocht.nl website for a client. Ik want to use the same template for the whole site, but as you can see, this website uses different pictures in the sidebar on every page. Is it possible to achieve this with the same template? Or should I create a different template for every page? It doesn’t seem logic to me to create about 7 different templates for such a small website.

    Thanx in advance!
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Yea, just use a TV (Template Variable) for the sidebar image and you can change it per page.
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 15082
        • 195 Posts
        You can simply use a template variable to hold the image for each document.
        Then in your template you just note [tt][*mySideBarImage*][/tt] or whatever you named you TV.

        More on using TVs here http://svn.modxcms.com/docs/display/MODx096/Template+Variables

        Greetz
        JUSI

        EDIT: sorry, AMDbuilder was quicker smiley
          • 8010
          • 7 Posts
          dreamsare4living Reply #4, 17 years ago
          Thanx guys, going to have a look at this stuff smiley
            • 8010
            • 7 Posts
            dreamsare4living Reply #5, 17 years ago
            I have just created a Template Variable for the use of pictures in the sidebar and I’ve put the correct placeholder in the template’s code. Now I want to insert the pictures through the TV, each image linked to the correct page.

            I just found this http://wiki.modxcms.com/index.php/Template_Variable_Holds_an_Image help page in the MODx Wiki, which suggests that I should link my pictures right from the TV manager with an insert button.

            But I can’t find this button in my TV manager (using MODx Evolution 1.0). Is there any other way to link my pictures to my newly created TV?
              • 15082
              • 195 Posts
              Make sure that you’ve choosen the template in the TV settings (tick it) to enable the TV for that template.
              If so, in any document you’re editing using the template, you should see the TV as a field giving you the option to insert an image via the Filebrowser of MODx.
              You can also upload an image at this point.

              Greetz
              JUSI
                • 8010
                • 7 Posts
                dreamsare4living Reply #7, 17 years ago
                Thanks alot JUSI, this makes perfect sence! I am totally new to MODx, but start to enjoy it smiley