Welcome to WebmasterWorld Guest from 54.158.228.55

Forum Moderators: open

Message Too Old, No Replies

Dreamweaver Template code showing up on web page?

dreamweaver template web

     
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. : )
9:19 am on Sep 1, 2010 (gmt 0)

WebmasterWorld Senior Member beedeedubbleu is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Try cutting the text from the page then go into codeview and paste it below the top row.
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?
5:31 pm on Sep 1, 2010 (gmt 0)

5+ Year Member



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.
6:50 pm on Sep 1, 2010 (gmt 0)

WebmasterWorld Administrator martinibuster is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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. ;)
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
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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month