Solved

How to create editable regions in dreamweaver for page titles

Posted on 2008-10-06
3
527 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Several part series to implement Internet Explorer 11 Enterprise Mode
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.

762 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

20 Experts available now in Live!

Get 1:1 Help Now