How can I make my metatags "editable" regions in my template?
I tried doing it as shown below . . . but when trying to update the individual pages from the template, I get an error message that looks like its trying to tell me something is missing from the <!-- TemplateBeginEditable --> instruction.
Can anyone help?
I appreciate it!
<head>
<!-- TemplateBeginEditable -->
<meta name="keywords" content="cat, dog, apple, banana">
<meta name="description" content="My Description will go here.">
<title>My Title will go here</title>
<!-- TemplateEndEditable --><!-- InstanceBeginEditable -->
<title>undefined</title>
<!-- InstanceEndEditable -->
Every template has two editable regions in the head: doctitle and head. Make sure that your meta tags go in the editable region just before the closing </head> tag:
<!-- TemplateBeginEditable name="head" -->
Put meta tags and other items you want to be editable here
<!-- TemplateEndEditable -->
</head>Thanks for your response, David
Well, I've tried to implement your instructions on the template (see below for EXACT code). But on all the "child" pages, I am ONLY still allowed to edit the "Title" tag. Everything else is still GRAYED-OUT (unable to edit).
What did I do wrong?
- Jim
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<!-- TemplateBeginEditable name="head" -->
<meta name="keywords" content="resume,resume service,resume writer,resume assistance,resume assistant">
<meta name="description" content="Professionally-written Resumes ready in 60 minutes! Great quality & friendly service. Just $49.95. Lowest prices! Our 19th year. Work with a real person on the phone. Hassle-free (no forms to fill out like our competition). Guaranteed Job-Winning Resumes. Open 7 days til 12 Midnight.">
<title>Best c Resumes - Ready in 1 Hour!</title>
<style>
<!--
a {
color: #0000FF
}
-->
</style>
<link rel="File-List" href="../u4/17YUvRBD_files/filelist.xml">
<meta name="Microsoft Theme" content="blends 011">
<!-- TemplateEndEditable -->
</head>
That doesn't look like Dreamweaver template code at all. It looks as though it's been cobbled together from a Word HTML page. This is what one of my template heads looks like:
<!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>Stroll Along the Thames</title>
<!-- TemplateEndEditable -->
<link href="../examples/ch12/stroll.css" rel="stylesheet" type="text/css" />
<link href="../SpryAssets/SpryMenuBarHorizontal_stroll.css" rel="stylesheet" type="text/css" />
<script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<!-- TemplateBeginEditable name="head" -->
<meta name="description" content="Test page demonstrating how to build a Dreamweaver template" />
<!-- TemplateEndEditable -->
</head>Perhaps this will help:
Here is what each of the "child" pages based on the template now look like. The ONLY field displayed in the code is the TITLE field (which is editable ok). The other meta tags are not shown AT ALL in the "child" pages.
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40"><!-- InstanceBegin template="/Templates/Cheap_Hybrid_Liquid_FixedSidebars.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="head" --> <title>Great ORLANDO Resumes - Ready in 1 Hour!</title><!-- InstanceEndEditable -->
<style>
I'm not an expert on templates, but your code looks as though it has been created by an old version of Dreamweaver.
Recent versions of Dreamweaver put the <title> tag in an editable region called "doctitle", but yours is in a region called "head".
What I suggest you do is add the meta tags inside the existing "head" editable region:
<!-- InstanceBeginEditable name="head" -->
<title>Great ORLANDO Resumes - Ready in 1 Hour!</title>
<meta name="description" content="Description of the page" />
<!-- InstanceEndEditable -->Because it's an editable region, the <meta> tag won't be updated in existing child pages. It will only appear in new child pages spawned from the updated template. However, you can add you <meta> tags inside the "head" region of your existing child pages, because it's editable by definition.
Great solution, David!
It works!
Thanks so much for sharing your expertise with me.
By placing all the metatags withing the currently-functioning "Editable" region . . . . now the new "child" pages DO contain the text that can be edited.
I will just manually "Copy-and-paste" the same code into my existing pages.
Ur a genius.
Jim
If this is in a template or child page:
<!-- TemplateEndEditable --><!-- InstanceBeginEditable -->
there are serious problems with the way the template was created or the child page was created.
TemplateBegin or EndEditable html comments are the syntax dreamweaver uses in the .dwt template files.
InstanceBegin or EndEditable in an html comment should only be in properly created child pages of a .dwt template.
in otherwords- something is screwed up. The code in the page shouldn't have happened. And that dw is not allowing you to edit the page is reasonable- it can't make sense of the conflicting template html comments.
Yes, you are surely right!
The conversion from an old "FrontPage" index.htm . . . into Dreamweaver . . . reveals a lot of "crud" (useless code) that I guess FrontPage wanted . . . but DW sees as usless clutter.
Maybe in the near future I should just hire somebody to "recreate" my page . . .keeping the exact same look and feel . . . but do it "from scratch" using DW . . . so the code and such is all correct.
Anyway, for the time being David's clever suggestion does work for me . . . I'll use that for the time being:
"By placing all the metatags withing the currently-functioning "Editable" region . . . . now the new "child" pages DO contain the text that can be edited."
Thanks for your helpful reply.
I appreciate all this great advice!
Jim
North America
Europe, Middle East and Africa
Asia Pacific