homepage Welcome to WebmasterWorld Guest from 54.196.159.11
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
Forum Library, Charter, Moderator: open

WYSIWYG and Text Code Editors Forum

    
Dreamweaver Template code showing up on web page?
dreamweaver template web
LeahStorm




msg:4194895
 7:35 am on Sep 1, 2010 (gmt 0)

I've been working with dreamweaver templates for a few years, and until cs5, i've never seen this happen, and I feel stupid, like I should know why this has happened, but I don't.

At the top of my web pages, there is template code showing? How do I make that go away?

Here's what shows:
<!-- InstanceBegin template="/Templates/aa--template.dwt" codeOutsideHTMLIsLocked="false" -->


And here's my code inside the 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 -->
<style type="text/css">
_______________________________________________

Thanks to anyone with any ideas. : )

 

BeeDeeDubbleU




msg:4194911
 9:19 am on Sep 1, 2010 (gmt 0)

Try cutting the text from the page then go into codeview and paste it below the top row.

LeahStorm




msg:4195113
 4:21 pm on Sep 1, 2010 (gmt 0)

BDW,
Thank you for your reply. To be clear, you mean cut this:
<!-- InstanceBegin template="/Templates/aa--template.dwt" codeOutsideHTMLIsLocked="false" -->

and paste it below the top row... in the template?
The top row of what, exactly?

Shado




msg:4195146
 5:31 pm on Sep 1, 2010 (gmt 0)

Technically anything between the <head></head> or <!-- --> should not show in your browser. So I'm assuming you are using a template, if that is the case then I doubt I can help as I have only once used them and not very successfully. I use DW all the time (although I'm about to throw it out of the window) and have never come across this.

martinibuster




msg:4195187
 6:50 pm on Sep 1, 2010 (gmt 0)

It's probably showing because it's in the wrong place. That should be at the top of the code. If it's showing then it may be because that part of the template is outside of a previous head section. Here is the basic structure as it should be:

Example A
<doctype>
<html>
<head>
</head>
<body>
<table>
<tr>
<td>
</td>
</tr>
</table>
</body>
</html>


Here is an example of how what you are seeing can happen:

Example B
<doctype>
<html>
<head>
</head>
<body>
<doctype>
<html>
<head>
</head>

<table>
<tr>
<td>
</td>
</tr>
</table>
</body>
</html>



Example A demonstrates the basic structure your code should have. Examine your code and find where it deviates from that structure. Then please let us know what you find. ;)

LeahStorm




msg:4195352
 12:40 am on Sep 2, 2010 (gmt 0)

Shado & Martini, THANK YOU. I see what you're saying about where the head lands. So I found an old template from a site I created a long time ago, and copied the first 5 lines from that template in to my new one, and uploaded it, and it fixed it. BUT... here's the weird thing, dreamweaver STILL put that same line of text into the pages, BEFORE the <head> section.

Here's my new template code:
____________________________________
<html><head><meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
___________________________________



And here's the code inside one of the pages with the template applied to it. AND, it's greyed out in the code view of the page, so i can't make any changes to it, at all.
____________________________________
<html><!-- InstanceBegin template="/Templates/aa--template.dwt" codeOutsideHTMLIsLocked="false" --><head><meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
_____________________________________

This seems to have fixed it, but I wish I knew exactly why.

Thanks again!

Leah

MilGal




msg:4204508
 11:50 pm on Sep 20, 2010 (gmt 0)

maybe it's because of the type of document your are selecting, and maybe because it's a template, it has it's own set of rules as default, and maybe that code it's on that rules.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved