Skip navigation
Currently Being Moderated

doctype html and instancebegin template

Dec 23, 2011 3:06 PM

Tags: #cs5.5 #html5

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

 
Replies
  • Currently Being Moderated
    Jan 20, 2012 10:49 AM   in reply to jomariworks

    You forgot you <html> tag.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 20, 2012 10:54 PM   in reply to jomariworks

    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!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 20, 2012 11:04 PM   in reply to kakakirk

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

     

    I'm going to give it a try.

     

    ks

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 21, 2012 5:28 PM   in reply to jomariworks

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 4, 2012 12:08 PM   in reply to jomariworks

    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-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>

     

     

     

    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-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="en"> <!--<![endif]-->

     

    <head>

     

     

    I have no issues. Hope this helps.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 30, 2012 3:31 PM   in reply to numeroeins

    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!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points