CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   Cannot create new file from Dreamweaver template (http://www.codingforums.com/showthread.php?t=283815)

gathoni 12-08-2012 09:06 PM

Cannot create new file from Dreamweaver template
 
Hi

Just done my first website on dreamweaver. Then decided to seperate the HTML from the CSS. Now when I try to create a new file from the template in Dreamweaver I get a message that there is an error at line 185 (there is no line 185). The container div seems to be an issue bu I don't know how to fix it.

Here is a copy of the HTML. Thanks in advance for any help with this.

Code:

<!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>
<link rel="stylesheet" type="css" href="test.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="...." />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
</head>


<body class="container">

        <div class="header"><!-- TemplateBeginEditable name="Header" --><img src="../Live/images/headerindex.jpg" name="Insert_logo"width="960" height="148" border="0" id="Insert_logo" style="background: #C6D580; display:block;" /><!-- TemplateEndEditable -->
  <!-- end .header --></div>
  <div class="sidebar1">
  <ul class="nav">
      <li><a href="../Live/index.html">Home</a></li>
      <li><a href="../Live/search.html">Parts Search</a></li>
      <li><a href="../Live/sell.html">Sell Your Vehicle</a></li>
      <li><a href="http://stores.ebay.co.uk/Big-Red-Motor-Spares" target="_blank">Ebay Shop</a></li>
      <li><a href="../Live/contact.html">Contact Us</a></li>
    </ul>
 
    <p><!-- TemplateBeginEditable name="Button 1" --><a href="../Live/search.html"><img src="../Live/images/search-for-parts.gif" width="120" height="120" alt="parts search" /></a><!-- TemplateEndEditable --></p>
    <p><!-- TemplateBeginEditable name="Button 2" --><a href="../Live/sell.html"><img src="../Live/images/sell-your-vehicle.gif" width="120" height="120" alt="sell your vehicle" /></a><!-- TemplateEndEditable --></p>
<!-- end sidebar --></div>
  <div class="content">
    <div id="content"><!-- TemplateBeginEditable name="Content" -->
      <h1>Quality Used Vehicle Parts</h1>
      <p>Here at Big Red Motor Spares we pride ourselves in supplying good quality, OEM, used parts at competitive prices to both the public and trade.</p>
    <!-- TemplateEndEditable -->
    <!-- end .content -->
    </div>
   
<!-- TemplateBeginEditable name="Footer" -->
  <div class="footer">
  <p class="note">© 2012 Big Red Motor Spares</p>
  <!-- end footer -->
</div>
<!-- TemplateEndEditable -->

</body>
</html>


LearningCoder 12-08-2012 10:09 PM

What does the error message say?

One tip - steer well clear of DW.

Regards,

LC.

waxdoc 12-08-2012 11:49 PM

Dreamweaver phobia?
 
2 Attachment(s)
Dreamweaver is a wonderful, helpful, time-saving, error-correcting, etc. editing tool so cannot understand why some denounce DW out of hand.

However "Templates" are not my favorite. In DW, under MODIFY menu you have options >Template>Check Syntax and/or >Detach From Template.

Is the error message perhaps referring to the CSS file? There may be errors I have not checked but suspect you should start anew with proper CSS link path set up beforehand. You need to define a root site folder and save your template doc to that site's Template folder, then choose FILE>New>from that template doc. [see screen shot]

Why <body class="container">? Would think it should be an ID such as <body id="home"> ?

See scren shot of message below and correct your template to move <--editable region--> markers outside block elements
Code:

<body class="container">

<!-- TemplateBeginEditable name="Header" -->
<div class="header"><img src="../Live/images/headerindex.jpg" name="Insert_logo"width="960" height="148" border="0" id="Insert_logo" style="background: #C6D580; display:block;" />
  <!-- end .header --></div>
<!-- TemplateEndEditable -->
 
  <div class="sidebar1"> ...
 
    <!-- TemplateBeginEditable name="Button 1" -->
<p><a href="../Live/search.html"><img src="../Live/images/search-for-parts.gif" width="120" height="120" alt="parts search" /></a></p>
<!-- TemplateEndEditable -->
   
<!-- TemplateBeginEditable name="Button 2" -->
<p><a href="../Live/sell.html"><img src="../Live/images/sell-your-vehicle.gif" width="120" height="120" alt="sell your vehicle" /></a></p>
<!-- TemplateEndEditable -->
...

P.S. I would create an overall <DIV> to contain all the page content, such as
Code:

#wrap { margin: 0 auto; margin: 0 auto; width: 85%; max-width:950px; min-width: 250px;  position: relative; background: rgba(255,255,255,0.25);  z-index: 400;  }

LearningCoder 12-09-2012 12:39 AM

Quote:

Originally Posted by waxdoc (Post 1298435)
Dreamweaver is a wonderful, helpful, time-saving, error-correcting, etc. editing tool so cannot understand why some denounce DW out of hand.

It's just my own personal view, used it for the first time at college 2 weeks ago on monday. Talk about over complicating something which doesn't need to be.

It's probably the thought that it generates the HTML, I'd much prefer to hand code it as you know exactly what code you have. Not only that hand coding helps you to really understand what you're working with IMO.

Quote:

Why <body class="container">? Would think it should be an ID such as <body id="home"> ?
I think also, you should just style/target the body using the global element style like this:
Code:

body
{

}

as there will only ever be 1 <body> element on any given page. I don't think it's necessary to add a class or id.

Regards,

LC.

gathoni 12-09-2012 11:47 AM

Hi

Thanks for your help, I have managed to sort out the container issue, now the page footer is displaying correctly. I still have a problem with creating files from this template.

When I try, the error message reads........

"There is an error at line 185, column 13 (absoloute position4245) of (...file location and name.....) : Unbalanced #EndEditable tag."

I have tried to check the editable tags opening and closing, but I can't see the error.

Any ideas?

AndrewGSW 12-09-2012 04:50 PM

Your div with class "content" is unclosed, according to the code in your first post. This may be the problem.

waxdoc 12-10-2012 10:23 PM

always define site ROOT folder
 
Hard to guess what problem is, but always gather your files together in a folder and SITE>New Site -- define that site root folder and save all your files to that site root folder. Think you should have an index.html page in root folder. I would create and validate sample page before saving as a template ___.dwt file. You then save that template file to the site root folder you defined in the very beginning. Dreamweaver saves that .DWT file in a Template folder it creates.

See screen shot above.

One of the many nice features of Dreanweaver is that, when you type lesser-than symbol and slash </ , it completes any open tag that needs closing. This not only saves a bit of extra typing, it shows you what tag needs closing.

It's best to work in code pane of SPLIT view or in CODE view. And, obviously, you can write your own code.


All times are GMT +1. The time now is 03:32 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.