Solved

How to create editable regions in dreamweaver for page titles

Posted on 2008-10-06
3
528 Views
Last Modified: 2008-10-07
Hi folks, I have a website I am building. I make pages from the template yet when I try to put in unique page names, DW automatically erases them. Well, of course, its based on a template. I built one site before this where the problem didn't occur like this.

How do I make HTML pages from a template and put in unique page titles? The problem is my code gets messed up when I  try to insert an editable region in the header for the title. Does the title have to go here?
0
Comment
Question by:Wanderinglazyeye
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
Hube02 earned 500 total points
ID: 22655576
Usually, if you do "Save As Template" DW automatically adds the editible region for the title around the title tag. Either there is a bug in your DW or it was deleted somehow. Or perhaps it is there and not around your title tags.

Below is the file for an empty page saved as a template.

As you can see the editable region for the title is
<!-- TemplateBeginEditable name="doctitle" --><!-- TemplateEndEditable -->

Look for this in your template and put your title tag in there. If this region does not exist in your template then it has somehow been deleted. You will need to either rebuild the template or put these tags back in. Unfortunately, I do not thing you can put these tags in manually from within DW.

First test.... copy your template file or back it up. Open up the copy in a text editor and add the tags manually. Open up DW and see if the test works, create a page based on the test template. If everything works, then make the changes to your live 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=iso-8859-1" />

<!-- TemplateBeginEditable name="doctitle" -->

<title>Untitled Document</title>

<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->

</head>
 

<body>

</body>

</html>

Open in new window

0
 
LVL 18

Expert Comment

by:Hube02
ID: 22655595
I want to stress the importance of testing this on a template that no pages are based on first and thoroughly testing before trying to make the changes on the live template. If something goes wrong with the test than you have not done any serious damage.
0
 

Author Comment

by:Wanderinglazyeye
ID: 22662568
You were right, there was a bug. It wasn't putting that field into the templates. Furthermore, trying your approach, it seemed to work ok but the bug also persisted to some extent. Every tiem I tried to save my html file it asked whether I wanted to save it as a template.

The short of it is that I wasn't very far along, so I restarted the project testing along as you described, and so far, things seem to be fine, the field is inserted.

Thanks for your help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now