5 Replies Latest reply on May 5, 2010 8:37 AM by thuy.copeland

    Nested editable regions on template

    larrycfc Level 1

      The template has 2 library items, each containing javascript rollovers, and a couple of editable regions. It saves without error and previews fine. But when I try to create a file based on the template, the error reads: "There is an error at line 152, column 190 (absolute position 8582) of . . .filename. nested editable regions.

       

      http://www.aptcoweb.com/Templates/aptcopage.dwt

        • 1. Re: Nested editable regions on template
          thuy.copeland Level 2

          Your template looks fine. Post the page that is throwing the error message. It sounds like the page you built off of the template is the only one with the problem, not the template itself.

          • 2. Re: Nested editable regions on template
            larrycfc Level 1

            The error message pops up when I select new from template and choose this template. It doesn't let me go any further so I can't create a file at all.

            • 3. Re: Nested editable regions on template
              thuy.copeland Level 2

              Now I see it. Open your template, go to line 152 and delete this block of code:

               

              <body onLoad="MM_preloadImages('../assets/APTCO_PP2.gif','../assets/APTCO_ES2.gif','../assets/A PTCO_DP2.gif','../assets/APTCO_BF2.gif','../assets/APTCO_SP2.gif','../assets/APTCO_CS2.gif ')">

               

              it's a repeat of the <body> tag and it's confusing your template.

               

              You should also validate your template. I see multiple incorrect entries for XHTML. For example, image tags should be closed with a " />" (space-slash-angled bracket), not just ">".

              • 4. Re: Nested editable regions on template
                larrycfc Level 1

                Thanks very much! Interesting - when I deleted those lines, DW said it was in a locked section and changes would be discarded. Still I was able to save the changes and it works.

                 

                The images are all or mostly in the javascript DW writes to create rollovers. In fact, nearly everything the validator finds is code written by DW. I'm sure I made some errors myself, though and will look through to clean up.

                • 5. Re: Nested editable regions on template
                  thuy.copeland Level 2

                  Dreamweaver has the ability to auto-correct code issues like the problem you just experienced.

                   

                  Go to Dreamweaver > Preferences (or for PC, go to Edit > Preferences).

                  Category: Code Rewriting

                  Select the checkbox 'Fix invalidly nested and unclosed tags'

                   

                  When you reopen your file, you should see an alertbox, where DW wants to correct some code. Since you're using the XHTML doctype, your images should have a single tag closing <img src="" /> instead of <img src="">.