4 Replies Latest reply on Apr 14, 2010 9:37 AM by osgood_

    2 templates: what's my dumb mistake?

    powerdogvt

      Created a template and a number of pages from it, all with a red menu bar. Did a "save as" on the template file, so I had two templates (different names) in the template folder. Changed the menu to blue on the second template, but menu turned blue on all pages created from first template.

       

      Is saving/renaming a copy of a template not correct? Should I created a nested template instead?

        • 1. Re: 2 templates: what's my dumb mistake?
          osgood_ Level 8

          Sounds like the two templates now share the same css file?

           

          What process did you go through to change the menu from red to blue. I assume you opened the only css file linked to the page and change the color. This css file will be linked to the other template as well. Does that sound familiar?

          • 2. Re: 2 templates: what's my dumb mistake?
            osgood_ Level 8

            If I want to change the color of a specific part of another page made from a template I would introduce the new css into the editable css region in the <head> section of the template file OR if the template doesn't already have an editable region create one for the new css to be inserted into.

             

            As long as the new css rule comes after the linked css file, bingo!

            • 3. Re: 2 templates: what's my dumb mistake?
              powerdogvt Level 1

              This is the problem exactly. What if I just changed the name of the CSS file for the 2nd template and then linked to it?

              • 4. Re: 2 templates: what's my dumb mistake?
                osgood_ Level 8

                powerdogvt wrote:

                 

                This is the problem exactly. What if I just changed the name of the CSS file for the 2nd template and then linked to it?

                 

                Yes, you can do that of course. It goes without saying you need to duplicate the first css file so you will have two css files and two template files.

                 

                However think about what it is you are doing first. If you then change the navigation menu or say a news section on your site you'll have two template files to amend.

                 

                If you just need to change the presentation of a page in my opinion its always best to include the new/additional css styles in the head section of the page which you want to change. The page is then still linked to the one template.