6 Replies Latest reply on Mar 20, 2013 8:20 AM by jbasturacollingsguitars

    Can't manually add editable regions to <head> in template


      When I created my main template in Dreamweaver CS6 for my website, I had copied most of the page code from another layout I already had, including the head code.  I did not realize there were already editable regions built into the head section of the Dreamweaver template and deleted them when I pasted my previous code without adding new ones.  I then added an editable region to the body and started created pages using the template.


      Everything works well and updates properly when I make changes to the template but now that I am trying to add those editable regions back to the head section so I can change the page title (and possibly add more responsive code), it doesn't work.  I copied and pasted the following code into my template file in Dreamweaver and it saves in the template telling me it's updating the related pages, but when I open those individual pages in Dreamweaver, the code isn't there and those regions are not editable; only the original editable region I created in the body exists and works properly.  Everything else continues to work perfectly.


      Here is the code I pasted into the head around the <title> tag:


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

      <title>Collings Document Database</title>

      <!-- TemplateEndEditable -->


      And here is the code I pasted into the head just before the </head> tag:


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

      <!-- TemplateEndEditable -->



      Any help would be appreciated.  From everything I've read on these forums after searching, it sounds like pasting that code should work but I continue to get the results mentioned.  Thank you.

        • 1. Re: Can't manually add editable regions to <head> in template
          Nancy OShea Adobe Community Professional & MVP

          When things fail to work as expected, it's almost always due to code errors.  Copy & paste your Template code into the W3C Validation tool:





          Nancy O.

          • 2. Re: Can't manually add editable regions to <head> in template
            jbasturacollingsguitars Level 1

            Thanks for the response.  I've run the template code through the validator and the following two errors are the only ones that showed up.  I don't see how either of these would cause this issue.  Thoughts?


            Error Line 5, Column 53: Bad value X-UA-Compatible for attribute http-equiv on element meta.

            <meta http-equiv="X-UA-Compatible" content="IE=Edge">

            • Error Line 27, Column 127: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images. …gs_guitars_stroke_clear.png" width="184" height="81" class="scalable">  </div>
            • 3. Re: Can't manually add editable regions to <head> in template
              jbasturacollingsguitars Level 1

              Alright, well I got it to work.  There was some php code at the top of the template outside the html to control a required login page.  For some reason, all I had to do was remove that code, save the template and apply it to all documents with the editable regions added to the template, then add the php code back and resave the template.  Now it all works properly with editable sections in the header.  Very strange but I've got the desired result.

              • 4. Re: Can't manually add editable regions to <head> in template
                MurraySummers Level 8

                Everything on a DW template page is always editable. Are you sure you were working with a template (*.dwt.php) file? Additionally, the presence or absence of PHP scripting above the <html> tag would have no impact on the page's editability in DW. So, I'm puzzled about both your symptoms and your solution.


                At any rate, if it's working now, we can move on.

                • 5. Re: Can't manually add editable regions to <head> in template
                  mhollis55 Level 4

                  Delete line 5.


                  Add an alt="description of your image" to line 27.


                  This is the exact code that Dreamweaver puts into templates in the <head> region:


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

                  <title>Title of Page</title>

                  <!-- TemplateEndEditable -->


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

                  <!-- TemplateEndEditable -->


                  Frankly, if you're having problems, I'd restart Dreamweaver and simply create a new template. It will have these defined editable regions and you can go about defining your own in the body.

                  • 6. Re: Can't manually add editable regions to <head> in template
                    jbasturacollingsguitars Level 1

                    Murray, the template was editable.  It was when I added the editable regions to the head section of that template, saved and applied the changes to all related files, then tried to edit within those regions in the pages themselves that it wasn't working.  The template was editable and yes, it is a .dwt file.  Like I said, everything worked perfectly except when I added those editable regions to the template and then tried to do something with them in the related pages.

                    Honestly, I'm not sure what's going on either but it's working now.  The only other thing I can think of is that I reset the computer overnight before opening everything up this morning.  But I can assure you all I did this morning that was different from yesterday was remove that php code from the template and added the editable head regions again, saved the template and applied it to all pages, then reopened the template and readded the php code, saving the template and reapplying to all pages.  Then it all worked.  Certainly not the strangest computer-related experience I've ever had, so probably better to just accept it and move on.  If it happens again, then it will be time to look further into what might be causing the issue.