35 Replies Latest reply on May 3, 2011 5:07 PM by donnasander

    Another template issue

    zannie13 Level 1

      I asked for help on a template that someone else created and was told what a mess the template is and that it wasn't a DW template and to start over. I have done this (and appreciate the great advice), now the template was created in DW CS4, I put a background color in the template and it shows up on the template, but when I apply the template to a page, the background color is not there. Any suggestions? I have tried to copy the code, but I don't know how to paste it in here or how to attach it in any form.

       

      Thank you in advance again

        • 1. Re: Another template issue
          osgood_ Level 8

          zannie13 wrote:

           

          I asked for help on a template that someone else created and was told what a mess the template is and that it wasn't a DW template and to start over. I have done this (and appreciate the great advice), now the template was created in DW CS4, I put a background color in the template and it shows up on the template, but when I apply the template to a page, the background color is not there. Any suggestions? I have tried to copy the code, but I don't know how to paste it in here or how to attach it in any form.

           

          Thank you in advance again

           

          You DON'T apply a template to a page...you create a NEW page from the template:

           

          New>Page from Template>Choose your site>Select your template.

           

          I assume you have defined a site folder at the outset of building your site?

           

          If the background color appears in the template it will appear when you create a new page from that template.

           

          Hope that helps.

          • 2. Re: Another template issue
            zannie13 Level 1

            This is an existing site, with pages already created and when I say "Apply Template" that is exactly what I am reading in DW. Note below...Untitled.jpg

            Also notice the blue background and compare to the pic below

            Untitled2.jpg

            Thanks for taking the time to help me with this issue.

            • 3. Re: Another template issue
              osgood_ Level 8

              zannie13 wrote:

               

              This is an existing site, with pages already created and when I say "Apply Template" that is exactly what I am reading in DW. Note below...Untitled.jpg

              Also notice the blue background and compare to the pic below

              Untitled2.jpg

              Thanks for taking the time to help me with this issue.

              Hummm...it's not the way I would do it to be honest. Sounds like a disaster just waiting to happen. I can't really see why you would want to apply a template to an already designed page.

               

              The whole idea about templates is you build the first page as a Template in Dreamweaver and make new pages from that. Mixing and match template code on pre-built pages doesn't sound like a smooth transition to me.

               

              Does this page that you're attempting to apply your template to share the same css file? Check in the css file to make sure it has the same background color applied on the <body> tag. I assume the background is a a block of html color and not an image.

              1 person found this helpful
              • 4. Re: Another template issue
                zannie13 Level 1

                I know it sounds crazy, the thing is someone else created the site and now I am trying to clean it up a bit. They started out using the template and then for some reason detached it. I only wanted to re-attach the temiplate so that when I add or make changes I could do it to all pages at once, instead of one page at a time. I guess I should cancel that thought, huh? The background is just color, not an image and it is showing in the code, but it is not showing up on the page. Oh well, that's what I get for trying to fix others mess-ups.

                 

                thanks again for your help

                • 5. Re: Another template issue
                  MurraySummers Level 8

                  You DON'T apply a template to a page...you create a NEW page from the template:

                   

                  Sure you can.  It's only problematic when the page has existing content.  in that case, and only in that case, is creating a new page from the template and copying content from the old to the new page before saving it with the old page's name the optimal way to do this.

                  • 6. Re: Another template issue
                    zannie13 Level 1

                    Thank you Murray. I knew you could do this and I have done it the way you suggest.... copy and past into the template, but for some reason the background color is not applying. I do not get it. I have redone the page in every way I can think of, but still can't get the color to apply. I have all but given up on the whole thing. Thank you so much

                    • 7. Re: Another template issue
                      MurraySummers Level 8

                      Thank you Murray. I knew you could do this and I have done it the way you suggest.... copy and past into the template

                       

                      But that's not what I suggested.  You only use the template to spawn a new page.  It's that new page into which you paste the copied content.  Lets see your new page, please.  There are many reasons why a background color might not show up, and quite a few of them are not obvious....

                      • 8. Re: Another template issue
                        osgood_ Level 8

                        Murray *ACP* wrote:

                         

                        You DON'T apply a template to a page...you create a NEW page from the template:

                         

                        It's only problematic when the page has existing content.

                         

                        That's what the poster was trying to do so I stated it wasn't a good idea, not in my view anyway.

                         

                        No point in creating a page and then trying to apply another page design by way of a template to the exiting page and hoping that all will be well because it wo'nt.

                         

                        As for the background color its most probably a simple answer but without seeing the code and css its just a guessing game.

                        • 9. Re: Another template issue
                          zannie13 Level 1

                          I hate to sound stupid, but is there a way for you to view my code without me having to add the template to my site, or should I go ahead and add it to the site and give you the link?

                          • 10. Re: Another template issue
                            zannie13 Level 1

                            And that is what I meant... I created a new page from the template and then pasted some of the content in the new page. I haven't added the new page to my site, because it isn't correct. I have just been working on it in Dreamweaver CS4.

                            • 11. Re: Another template issue
                              osgood_ Level 8

                              zannie13 wrote:

                               

                              And that is what I meant... I created a new page from the template and then pasted some of the content in the new page. I haven't added the new page to my site, because it isn't correct. I have just been working on it in Dreamweaver CS4.

                               

                              Paste the incorrect pages code in the forum, (the one where the background color is missing) together with any css associated with the page.

                               

                              It's no good providing the original template code, that works doesnt it, youre seeing the background color?

                              • 12. Re: Another template issue
                                zannie13 Level 1

                                Neither of the template background colors would apply. Here is the code to the new template. Thanks again 

                                 

                                 






                                 

                                <!--

                                body,td,th {

                                     font-family: Arial, Helvetica, sans-serif;

                                     font-size: 12px;

                                }

                                body {

                                     background-color: #d6dbde;

                                }

                                a:link

                                .STYLE2 {     font-family: Arial, Helvetica, sans-serif;

                                     font-size: 10px;

                                     color: #333333;

                                }

                                -->








                                 

                                 

                                 

                                 

                                 

                                 


                                !../images/taiji-03.jpg|height=67|alt=logo|width=432|src=../images/taiji-03.jpg!














                                 

                                 

                                 

                                 

                                !../images/button-home.jpg|height=22|width=74|src=../images/button-home.jpg!

                                !../images/button_topics.jpg|height=22|width=83|src=../images/button_topics.jpg!

                                !../images/button_e&w.jpg|height=22|width=138|src=../images/button_e&w.jpg!

                                !../images/taiji_13.jpg|height=22|width=62|src=../images/taiji_13.jpg!

                                !../images/Products.jpg|height=22|width=70|src=../images/Products.jpg!

                                !../images/button_research.jpg|height=22|width=83|src=../images/button_research.jpg!

                                !../images/Contactus.jpg|height=22|width=80|src=../images/Contactus.jpg!

                                !../images/Photoalbum.jpg|height=22|width=95|src=../images/Photoalbum.jpg!

                                !../images/inst.certificate.jpg|height=22|width=121|src=../images/inst.certificate.jpg!

                                 




                                 

                                 

                                 

                                 

                                <!-- TemplateBeginEditable name="Title" ><! TemplateEndEditable -->






                                 

                                 

                                 

                                 

                                 

                                 

                                 

                                <!-- TemplateBeginEditable name="EditRegion2" ><! TemplateEndEditable -->

                                     

                                 


                                 




                                 

                                 

                                 

                                 

                                Visit our sister site, Chattanooga Tai Ji Community








                                 

                                 

                                 

                                 

                                 

                                Copyright 2008-2009. Applied Tai Ji Inc. All rights reserved.

                                 

                                !../images/logo2.jpg|height=69|width=326|src=../images/logo2.jpg!


                                 

                                </html

                                • 13. Re: Another template issue
                                  zannie13 Level 1

                                  Ok, that's not what I sent in the email... what happened to my code?

                                  • 14. Re: Another template issue
                                    osgood_ Level 8

                                    zannie13 wrote:

                                     

                                    Ok, that's not what I sent in the email... what happened to my code?

                                     

                                    If the background color doesn't show in the template file it won't show in any page you create from the template. You need to get the template right.

                                     

                                    Can you upload it to the web, zip it and any css file associated with it in a folder and give a link to that?

                                    • 15. Re: Another template issue
                                      zannie13 Level 1

                                      It does show in the template, just not when I create a page from the template. That's why I am so confused. I am not sure how to zip and do the css file. I am sorry. 

                                       

                                      Here is the link to the page http://appliedtaiji.com/untitled.html I did not add any content to this page, just the template. Is that a good thing? LOL

                                       

                                      Thank you so much for your patience and determination. You are truly appreciated

                                      • 16. Re: Another template issue
                                        osgood_ Level 8

                                        Look in your original template file for the below code: (It should be <style type="text/css"> NOT as it is below <style type="Templates/text/css">. What is it in the original template file??

                                         

                                         

                                        <style type="Templates/text/css">
                                        <!--
                                        body,td,th {
                                            font-family: Arial, Helvetica, sans-serif;
                                            font-size: 12px;
                                        }
                                        body {
                                            background-color: #d6dbde;
                                        }
                                        a:link {
                                            color: #009;
                                        }
                                        .STYLE2 {    font-family: Arial, Helvetica, sans-serif;
                                            font-size: 10px;
                                            color: #333333;
                                        }
                                        -->
                                        </style>

                                        • 17. Re: Another template issue
                                          MurraySummers Level 8

                                          Your template is not properly built - the two editable regions that are normally placed in the head of the page are missing -

                                           

                                          In the template page, this -

                                           

                                          <title>Template</title>

                                           

                                          should be this -

                                           

                                          <!-- TemplateBeginEditable name="doctitle" -->
                                          <title>Template</title>
                                          <!-- TemplateEndEditable -->

                                           

                                          and this -

                                           

                                          </head>

                                           

                                          should be this -

                                           

                                          <!-- TemplateBeginEditable name="head" -->

                                          <!-- TemplateEndEditable -->

                                          </head>

                                           

                                          Make those changes and then save the template file.  It will automatically update your child pages which must then be uploaded.

                                           

                                          The reason you aren't seeing your background color is here -

                                           

                                          <style type="Templates/text/css">

                                           

                                          The browser has no idea what to do with this unknown type!  It should be this -

                                           

                                          <style type="text/css">

                                           

                                          Make that change and see what happens!

                                          • 18. Re: Another template issue
                                            zannie13 Level 1

                                            Here is the original template link...  http://www.appliedtaiji.com/untitled1.html.

                                             

                                            Thank you so much. I will work on it later and hopefully all issues will be resolved. Time to get the kiddies now. Have a great day. I will let you know if it works.

                                            • 19. Re: Another template issue
                                              zannie13 Level 1

                                              The code below is the code in the template. Wonder what am I doing wrong in creating a template? I did the "save as template" after I had put the buttons, etc in an html file. Should I have done this differently?

                                               

                                               

                                               


                                               


                                              </head

                                              • 20. Re: Another template issue
                                                MurraySummers Level 8

                                                Should I have done this differently?

                                                 

                                                Posting code from an email just doesn't work.  But I don't think we need to see the template any longer.  Your problem has been solved, no?

                                                • 21. Re: Another template issue
                                                  zannie13 Level 1

                                                  Ok, I have made these changes, but it gets even weirder.... The background part in the template is now..

                                                  . So no my problem is not solved yet. Sorry.

                                                  • 22. Re: Another template issue
                                                    MurraySummers Level 8

                                                    Ok, I have made these changes, but it gets even weirder.... The background part in the template is now..

                                                     

                                                    Huh?  Show us your page now, please.

                                                    • 23. Re: Another template issue
                                                      zannie13 Level 1

                                                      On this one, I created a new html file and applied the template... http://appliedtaiji.com/untitled.html

                                                       

                                                      On this one, I created a new page "from" the template... http://appliedtaiji.com/untitled-1.html

                                                       

                                                      That is what I meant by it keeps getting more weird.

                                                      • 24. Re: Another template issue
                                                        MurraySummers Level 8

                                                        The second page is NOT the child of a template.  Furthermore, it contains an invalid link to the CSS file -

                                                         

                                                        <link style type="file:///C|/Users/Owner/Documents/appliedtaiji.com/Templates/text/css">

                                                         

                                                        The type attribute of the link tag is NOT a link it's a type, i.e., 'type="text/css"'

                                                         

                                                        The first page is the child of a template and its link tag is also improperly formatted.

                                                         

                                                        <style type="Templates/text/css">

                                                        It should be <style type="text/css"> just like the earlier instance.
                                                        Fix those things and the pages should look alike.

                                                        • 25. Re: Another template issue
                                                          zannie13 Level 1

                                                          Ok, I can change the code and make it work, but WHY is it correct in the template, but changes code when I make a page from the template? This is what the template code looks like, before adding/applying it to a page.

                                                           

                                                           


                                                           



                                                           

                                                           

                                                          I do not understand why the code changes like that. I used the same template but added it different ways. They both changed in different ways. Like I said before.... WEIRD!!!

                                                          • 26. Re: Another template issue
                                                            osgood_ Level 8

                                                            Can you take us through the steps you are going through to make this template?

                                                             

                                                            1) First you have defined a site root folder, yes?

                                                             

                                                            2) Then you construct a page with editable regions and save it as a Template>File>Save As Template. This creates a Templates folder in your site folder with your .dwt file inside it?

                                                             

                                                            3) You create a new page from the template>New>page from Template>Select the template from your site root folder.

                                                             

                                                            4) Save the page into your site folder, not the Templates folder?

                                                             

                                                            If you follow those few steps then the css <style> tag in your child page should not be changing when you create a new page from the template.

                                                            • 27. Re: Another template issue
                                                              MurraySummers Level 8

                                                              Obviously, your code is not appearing in your posts.  Please make sure that when you want to include code, you post from the web interface at http://forums.adobe.com, and that you use the double chevron icon on the toolbar to select Syntax Highlighting > Plain.  Without seeing your code, it's a bit hard to respond to your inquiries.

                                                               

                                                              Obviously something is wrong with your method/workflow and we are just trying to find out what that is....

                                                              • 28. Re: Another template issue
                                                                MurraySummers Level 8

                                                                If you follow those few steps then the css <style> tag in your child page should not be changing when you create a new page from the template.

                                                                 

                                                                Sure it will.  If it's a document relative link, it will look like this in the Template -

                                                                 

                                                                <link href="../path_to_the_stylesheet.css"

                                                                 

                                                                and like this in a child saved at the root of the site -

                                                                 

                                                                <link href="path_to_the_stylesheet.css"

                                                                • 29. Re: Another template issue
                                                                  osgood_ Level 8

                                                                  Murray *ACP* wrote:

                                                                   

                                                                  If you follow those few steps then the css <style> tag in your child page should not be changing when you create a new page from the template.

                                                                   

                                                                  Sure it will.  If it's a document relative link, it will look like this in the Template -

                                                                   

                                                                  <link href="../path_to_the_stylesheet.css"

                                                                   

                                                                  and like this in a child saved at the root of the site -

                                                                   

                                                                  <link href="path_to_the_stylesheet.css"

                                                                   

                                                                  NOT the link, of course that will change. He has no link to a css stylesheet just an embeded css style tag, that should not be changing from:

                                                                   

                                                                  <style type="text/css">

                                                                   

                                                                  to

                                                                   

                                                                  <style type="Templates/text/css">

                                                                  • 30. Re: Another template issue
                                                                    MurraySummers Level 8

                                                                    Right - the 'type' attribute definitely should not be changing.  Any document relative LINKS on the page will be managed, however.

                                                                     

                                                                    How the changes are happening to the type attribute are beyond me - I've used DW since DW2 and have never seen this happen either to myself or to anyone else....

                                                                    • 31. Re: Another template issue
                                                                      osgood_ Level 8

                                                                      Murray *ACP* wrote:

                                                                       

                                                                      How the changes are happening to the type attribute are beyond me - I've used DW since DW2 and have never seen this happen either to myself or to anyone else....

                                                                       

                                                                      Me neither......but stranger things have happen so I'm not surprised.

                                                                       

                                                                      I would start a simple test site from scratch in this instance and see if it continues to happen. If the poster follows the simple steps as I've laid out in my post and it happens again then something is badly wrong. If the issue goes away then there is something corrupt about the present site set up.

                                                                      • 32. Re: Another template issue
                                                                        zannie13 Level 1

                                                                        <!-- InstanceBeginEditable name="doctitle" -->
                                                                        <title>Untitled Document</title>
                                                                        <!-- InstanceEndEditable -->
                                                                        <!-- InstanceBeginEditable name="head" -->
                                                                        <!-- InstanceEndEditable -->
                                                                        <style type="text/css">

                                                                         

                                                                        Ok, I created a test site and followed the basic 4 steps given, followed the instructions on how to add code (thank you so much for that, I have been trying to figure it out for a long time) and pasted the code from the new site/template/page. So is this normal, if so, then IT IS the old site. What a pain to try to figure out what someone else has done to the site. Thank you both so much, I know you have both gone above and beyond the call of duty... Thank you, thank you, thank you.

                                                                        • 33. Re: Another template issue
                                                                          MurraySummers Level 8

                                                                          I'm not entirely sure what you are showing us here, but so far, the code looks OK.  It's missing quite a bit yet, though....

                                                                          • 34. Re: Another template issue
                                                                            zannie13 Level 1

                                                                            I don't understand why things are missing if I am creating the template in DW and following the instructions to create a page from the template.

                                                                             

                                                                            I will be out of commission for a while and will not be able to work on this. Maybe by the time I get to start again, I will have figured it out.

                                                                             

                                                                            Thanks again to both of you for all of your help.Merry Christmas/Happy Holidays, etc. 

                                                                            • 35. Re: Another template issue
                                                                              donnasander

                                                                              the answer to this problem is very simple. You have to check your tags for the editable regions, and THEY MUST MATCH!! If the "being editable region" tag in before a <div> tag....then the closing editable region tag must be OUTSIDE the closing editable region tag. Like this: </div><end editable region....etc etc> Or, you can put them both inside...actually, if you have an editable region on a content <div> tag...you should close the E.R. before closing the <div> tag for that content. (and the opening tag should be AFTER the opeing <div> tag...so the whole editable region is enclosed by DIVs. Get it?? I can't believe all these "pros" can't/couldn't answer this issue.

                                                                               

                                                                              If your closing E.R. tag is outside the div...your background won't display on the created pages...but since the template doesn't care about the E.R.s...it does display there...