?
Solved

How to create editable regions in dreamweaver for page titles

Posted on 2008-10-06
3
Medium Priority
?
543 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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

569 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