Skip navigation
Chamuel333
Currently Being Moderated

How to make metatags "Editable" region in my template?

Apr 10, 2009 1:04 PM

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 -->

 
Replies
  • Currently Being Moderated
    Apr 10, 2009 2:23 PM   in reply to Chamuel333

    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>
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 10, 2009 3:23 PM   in reply to Chamuel333

    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>
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 10, 2009 4:13 PM   in reply to Chamuel333

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 11, 2009 12:15 AM   in reply to Chamuel333

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points