9 Replies Latest reply: Sep 30, 2012 3:31 PM by njtesolbeweb RSS

    doctype html and instancebegin template

    jomariworks Community Member

      I have a template I've created in Dreamweaver 5.5 in which the first line reads <!DOCTYPE html>

       

      When I create a document from this template, the first line is changed to:

      <!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" --><!DOCTYPE html>

       

      This messes up Internet Explorer really bad.

       

      Is there a way to tell Dreamweaver to either (1) move InstanceBegin code somewhere else or (2) drop it entirely?

       

      Firefox, Chrome, Safari and the browser that comes with the Kindle Fire are unbothered by this excess code. Internet explorer, however, is destroyed by this.

       

      TIA

       

      John Hughes

        • 1. Re: doctype html and instancebegin template
          Roooge

          You forgot you <html> tag.

          • 2. Re: doctype html and instancebegin template
            jomariworks Community Member

            HTML tag is at the top within a set of conditional tests that check for flavors of IE

             

            <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->

            <!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->

            <!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->

            <!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->

            • 3. Re: doctype html and instancebegin template
              kakakirk

              I'm running into the exact same problem using Zerb's Foundation framework. The conditional codes for stupid IE causes problems with Deamweaver's template code that only shows up in IE.

               

              Did you ever find a workaround? I'm really depending on this framework to build a client's site and hate to have to start over!

              • 4. Re: doctype html and instancebegin template
                kakakirk Community Member

                I think I found the answer: http://www.bitwisemag.com/2/Dreamweaver-Custom-Tags-and

                 

                I'm going to give it a try.

                 

                ks

                • 5. Re: doctype html and instancebegin template
                  jomariworks Community Member

                  As a workaround whenever I update the template, I close all documents in the site and then I search and replace the webroot folder, moving the <!-- InstanceBegin... line below the <!DOCTYPE html>

                  • 6. Re: doctype html and instancebegin template
                    jomariworks Community Member

                    If the bitwiseemag article XML command file trick works, please post the XML here.

                    • 7. Re: doctype html and instancebegin template
                      Watanabe916

                      I was having the same problem.  I got it working by replacing:

                       

                      <!--[if gt IE 8]>

                       

                      with:

                       

                      <!--[if (gt IE 8)]>

                       

                      Don't know why, but DW doesn't recognize the <html> tag in the original code, but does after adding the parentheses.

                      • 8. Re: doctype html and instancebegin template
                        numeroeins Community Member

                        This comment:   <!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->    MUST BE placed BETWEEN the <html> and the <head> OR before the conditional comments so that the changes made to this section on your template(s) will reflect on all pages created from them.

                         

                        Below is what I have on my template:

                         

                         

                        <!DOCTYPE html>

                        <html>

                        <!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->

                        <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->

                        <!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->

                        <!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->

                        <!--[if IE 8]><html class="no-js lt-ie9" lang="en"> <![endif]-->

                        <!--[if gt IE 8]><!--> <html lang="de"> <!--<![endif]-->

                         

                        <head>

                         

                         

                         

                        This is the result of the TemplateInfo tag:

                         

                         

                         

                        <!DOCTYPE html>

                        <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/DE-SubSiteNew.dwt" codeOutsideHTMLIsLocked="true" -->

                         

                         

                        <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->

                        <!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->

                        <!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->

                        <!--[if IE 8]><html class="no-js lt-ie9" lang="en"> <![endif]-->

                        <!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->

                         

                        <head>

                         

                         

                        I have no issues. Hope this helps.

                        • 9. Re: doctype html and instancebegin template
                          njtesolbeweb

                          I tried all of the suggestions on this page adding them one by one, and the page created (soon to be at least 20) from the template shows up blank in IE.

                           

                          Here's the template code:

                          <!DOCTYPE html>

                          <html>

                          <!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->

                          <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neithe r/ -->

                          <!--[if (lt IE 7)]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->

                          <!--[if (IE 7])><html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->

                          <!--[if (IE 8)]><html class="no-js lt-ie9" lang="en"> <![endif]-->

                          <!--[if (gt IE 8)]><!--> <html lang="de"> <!--<![endif]-->

                          <head>

                           

                          Here's the code on the resulting page:

                          <!DOCTYPE html>

                          <html><!-- InstanceBegin template="../../../public/Templates/TemplateF12.dwt" codeOutsideHTMLIsLocked="true" -->

                           

                          <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neithe r/ -->

                          <!--[if (lt IE 7)]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->

                          <!--[if (IE 7])><html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->

                          <!--[if (IE 8)]><html class="no-js lt-ie9" lang="en"> <![endif]-->

                          <!--[if (gt IE 8)]><!--> <html lang="de"><!-- InstanceBegin template="../../../public/Templates/TemplateF12.dwt" codeOutsideHTMLIsLocked="true" --> <!--<![endif]-->

                          <head>

                           

                          Help!