7 Replies Latest reply on Sep 24, 2009 6:30 AM by Nadia-P

    template that does not let an external css to be attached

    derrida Level 1
      Hi
      i have a template with en editable region for mainContent. and it is applied to all the pages in my site.

      now i want to attach an external css file to one of the pages that is based on that template, and i get this message:
      "a request to create a new style, link or import failed. if you work with an instance of a template, make sure that you have an editable region in the head tag".

      so i went to my template and selected all the head tag and made it an editable region.

      but i still get the same message.

      what can i do?


      best regards
        • 1. Re: template that does not let an external css to be attached
          Level 7
          > so i went to my template and selected all the head tag and made it an
          > editable
          > region.

          Did you look at the code? You cannot use DW's user interface to do this.

          This is the sign of an improperly made template.

          Do this -

          Create a new page (Basic HTML).
          Use FILE | Save as Template....
          Look at the code in the head region of the page, particularly the editable
          region around the <title> tag, and the other editable region in the head
          called "head".
          Make your template file look like that.

          Always use FILE | Save as Template when you create your templates and you
          won't have this problem again.

          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          ==================


          "derrida" <webforumsuser@macromedia.com> wrote in message
          news:gjnel3$s46$1@forums.macromedia.com...
          > Hi
          > i have a template with en editable region for mainContent. and it is
          > applied
          > to all the pages in my site.
          >
          > now i want to attach an external css file to one of the pages that is
          > based on
          > that template, and i get this message:
          > "a request to create a new style, link or import failed. if you work with
          > an
          > instance of a template, make sure that you have an editable region in the
          > head
          > tag".
          >
          > so i went to my template and selected all the head tag and made it an
          > editable
          > region.
          >
          > but i still get the same message.
          >
          > what can i do?
          >
          >
          > best regards
          >

          • 2. Re: template that does not let an external css to be attached
            derrida Level 1
            yes it does work now!!!

            thanks

            ron
            • 3. Re: template that does not let an external css to be attached
              Level 7
              Use the right method to create your Templates, and you won't have any
              problems.

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              ==================


              "derrida" <webforumsuser@macromedia.com> wrote in message
              news:gjnnbt$96l$1@forums.macromedia.com...
              > yes it does work now!!!
              >
              > thanks
              >
              > ron

              • 4. Re: template that does not let an external css to be attached
                Imperial Group LLC

                I am having the exact same problem but my template was saved as a template. I created a page from my template and made editable regions, when I go to create a style it tells me "A request to create a new STYLE, LINK, or IMPORT failed. If you are working with an instance of a template, make certain that there is an editable region within the head tag." I've tried making an editable region within the head tag and it still doesn't work.

                 

                Here is my code.

                 

                 

                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <html xmlns="http://www.w3.org/1999/xhtml"><head>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <title>Witmer Furniture</title>
                <style type="text/css">

                 

                #container {
                    width: 780px;
                    margin-right: auto;
                    margin-left: auto;
                    background-color: #FFFFFF;
                    margin-top: 0px;
                }

                 

                </style>
                <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
                <link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
                <script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
                <link href="../footer.css" rel="stylesheet" type="text/css" />
                <link href="../columnone.css" rel="stylesheet" type="text/css" />
                <link href="../columntwo.css" rel="stylesheet" type="text/css" />
                <link href="../columnthree.css" rel="stylesheet" type="text/css" />
                <style type="text/css">

                 

                body {
                    margin-top: 0px;
                    margin-left: 0px;
                    margin-right: 0px;
                    margin-bottom: 0px;
                    background-color: #000000;
                }

                 

                </style>

                 

                </head>

                 

                <body>

                 

                <div id="container">
                  <div id="banner"><img src="../images/banner5.png" alt="Witmer Furniture" /></div>
                  <div id="cascading menu">
                    <ul id="MenuBar1" class="MenuBarHorizontal">
                      <li><a class="MenuBarItemSubmenu" href="witmerfurniture.com">BEDROOM</a>
                      <ul>
                            <li><a href="#">Bedroom Sets</a></li>
                            <li><a href="#">Beds</a></li>
                            <li><a href="#">Nightstands</a></li>
                            <li><a href="#">Dressers</a></li>
                            <li><a href="#">Case Goods</a></li>
                            <li><a href="#">Mirrors</a></li>
                        </ul>
                      </li>
                <li><a href="#" class="MenuBarItemSubmenu">OCCASIONAL</a>
                      <ul>
                            <li><a href="#">Coffe Tables</a></li>
                            <li><a href="#">End Tables</a></li>
                            <li><a href="#">Sofa Tables</a></li>
                        </ul>
                      </li>
                <li><a class="MenuBarItemSubmenu" href="#">ENTERTAINMENT</a>
                      <ul>
                            <li><a href="#">T.V. Stands</a> </li>
                            <li><a href="#">Armoires</a></li>
                        </ul>
                      </li>
                <li><a href="#" class="MenuBarItemSubmenu">HOME OFFICE</a>
                      <ul>
                            <li><a href="#">Desks</a></li>
                            <li><a href="#">Bookcases</a></li>
                            <li><a href="#">Cradenzas</a></li>
                        </ul>
                      </li>
                <li><a href="#" class="MenuBarItemSubmenu">NEW PRODUCTS</a>
                    <ul>
                            <li><a href="#">Weston</a></li>
                          <li><a href="#">Summit Lake</a></li>
                        </ul>
                      </li>
                    </ul>
                  </div>
                 
                 
                  <!-- TemplateBeginEditable name="EditRegion1" -->
                  <div id="main">
                    <script type="text/javascript">
                AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','780','height','280','title','flash','src','../Flash/WitmerFlash','loop','false','qual ity','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Ve rsion=ShockwaveFlash','wmode','transparent','movie','../Flash/WitmerFlash' ); //end AC code
                    </script>
                    <noscript>
                    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="780" height="280" title="flash">
                      <param name="movie" value="../Flash/WitmerFlash.swf" />
                      <param name="quality" value="high" />
                      <param name="LOOP" value="false" />
                      <param name="wmode" value="transparent" />
                      <embed src="../Flash/WitmerFlash.swf" width="780" height="280" loop="false" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"></embed>
                    </object>
                    </noscript>
                  </div>
                  <!-- TemplateEndEditable -->
                 
                 
                  <!-- TemplateBeginEditable name="EditRegion2" -->
                  <div id="body"><img src="../images/collections border.png" alt="Collections" width="780" height="30" /></div>
                 
                 
                  <div id="columnone">
                    <ul>
                      <li><a href="ashland.html">Ashland</a></li>
                      <li><a href="brookb.html">Brook B</a></li>
                      <li><a href="Clayton.html">Clayton</a></li>
                      <li><a href="contemporary.html">Contemporary</a></li>
                      <li><a href="darlington.html">Darlington</a></li>
                    </ul>
                  </div>
                 
                 
                 
                  <div id="columntwo">
                    <ul>
                      <li><a href="ellyg.html">Elly G</a></li>
                      <li><a href="oakgrove.html">Oak Grove</a></li>
                      <li><a href="southbay.html">Southbay</a></li>
                      <li><a href="stratford.html">Stratford</a></li>
                      <li><a href="summitlake.html">Summit Lake</a></li>
                    </ul>
                  </div>
                 
                 
                  <div id="columnthree">
                    <ul>
                      <li><a href="taylorj.html">Taylor J</a></li>
                      <li><a href="unity.html">Unity</a></li>
                      <li><a href="weston.html">Weston</a></li>
                    </ul>
                  </div>
                  <!-- TemplateEndEditable -->
                  <div id="footer">
                    <ul>
                      <li><a href="index.html">Home</a></li>
                      <li><a href="aboutus.html">About Us</a></li>
                      <li><a href="../contactus.html">Contact Us</a></li>
                      <li><a href="sitemap.html">Site Map</a></li>
                    </ul>
                  </div><!--container div --></div>
                <!--This is the end of the container -->
                <script type="text/javascript">
                <!--
                var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
                //-->
                </script>
                </body>
                </html>

                • 5. Re: template that does not let an external css to be attached
                  Nadia-P Level 5

                  There is something wrong with the template markup on your page, there is no editable region around the <title> tag  and the <head>

                   

                   

                   

                  the following code is a barebones html page saved as a template:  (Using SAVE AS TEMPLATE)

                   

                   

                  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                  <html xmlns="http://www.w3.org/1999/xhtml">
                  <head>
                  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                  <!-- TemplateBeginEditable name="doctitle" -->
                  <title>Untitled Document</title>
                  <!-- TemplateEndEditable -->

                   

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

                  </head>

                   

                  <body>
                  </body>
                  </html>

                   

                   

                  Notice how the top of your document does not have the template markup as seen in red above.

                   

                  Do the same test.

                  Create a new page. (no need to enter any information).

                  Now save the page as a template and you should see the code being similar to the above.

                   

                  The editable head region would be where you would insert your styles if needed.

                   

                  Once you have created your master template (dwt file), you then create child pages from the template by using

                   

                  FILE>NEW>PAGE FROM TEMPLATE> selecting the name of the master template in the list.

                   

                   

                   

                   

                  --

                  Nadia

                  Adobe Community Expert : Dreamweaver

                  ---------------------------------------------------------------

                  Unique CSS Templates | Tutorials | SEO Articles

                  http://www.DreamweaverResources.com

                  --------------------------------------------------------------------------

                  Web Design & Development

                  http://www.perrelink.com.au

                  http://twitter.com/nadiap

                  • 6. Re: template that does not let an external css to be attached
                    Imperial Group LLC Level 1

                    Thank you very much, that worked. Before, when I tried to create a template to see if it matched my code I went into "save as", then selected the template extension. Needless to say, the editable region did not show around the title tag. When I went to file and clicked "save as template" it showed up. Thank you for pointing that out to me.

                    • 7. Re: template that does not let an external css to be attached
                      Nadia-P Level 5

                      You're welcome. 

                       

                      If you don't save the file directly as a template, then DW doesn't know that it needs to insert the editable regions in the head.  This is one of the most common problems when people start working with templates - so you're not alone  :-)

                       

                       

                       

                      --

                      Nadia

                      Adobe Community Expert : Dreamweaver

                      ---------------------------------------------------------------

                      Unique CSS Templates | Tutorials | SEO Articles

                      http://www.DreamweaverResources.com

                      --------------------------------------------------------------------------

                      Web Design & Development

                      http://www.perrelink.com.au

                      http://twitter.com/nadiap