PDA

View Full Version : Template blocking page titles and meta


davesite
09-09-2008, 06:32 PM
Hi there,

I am not so good with code, but have just managed to pull a site together with DW.

My problem is I use a template that contains the page name, and meta data. So therefore on each new page I create I cannot give it an individual name.
Here's an example there the Instance begins blocks the rest of the code.

<!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>
</head><!-- InstanceBegin template="/Templates/Journeys template.dwt" codeOutsideHTMLIsLocked="false" --><script src="../../overland/Scripts/AC_ActiveX.js" type="text/javascript"></script>
<script src="../../overland/SpryAssets/SpryCollapsiblePanel.js" type="text/javascript">
</script>
<link href="../../overland/SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../../overland/SpryAssets/SpryCollapsiblePanel.js" type="text/javascript">
</script>
<link href="../../overland/SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/atom+xml" title="Feed" href="http://page2rss.com/atom/9e272dc673279b3be1d6a46a2194cec2" />
<link rel="shortcut icon" href="/favicon.ico" />
<title>The Longest Way Home</title>
<meta name="description" content="This is the travel site of

I would like to my able to change the title on each page, and the meta tags.

How can I do this? I figure I need to change something in the template to allow for individual changes to the <title> and meta data? Just don't know how to do it? Nor how to do it without messing up the sites current pages?!!

Any help much appreciated

Dave

edbr
09-10-2008, 01:15 AM
you have <head>
</head> duplicated remove the first instance,
anywhere you want to make individual changes should be an editable region

davesite
09-10-2008, 03:55 AM
Thanks for the reply.

I removed the first <head> </head> But still the area is locked. I cannot delete <!-- InstanceBegin template="/Templates/Journeys template.dwt" as it is locked too. And if I copy to notepad, delete, paste to new html, save as, it comes up with errors. And even with that, it's no longer avaibable under the template, so does not get changed when the template gets changed. And I have about 30 pages.

Here's the page again. Here's the code from a page

<!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">
<!-- InstanceBegin template="/Templates/Journeys template.dwt" codeOutsideHTMLIsLocked="false" --><script src="../../overland/Scripts/AC_ActiveX.js" type="text/javascript"></script>
<script src="../../overland/SpryAssets/SpryCollapsiblePanel.js" type="text/javascript">
</script>
<link href="../../overland/SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../../overland/SpryAssets/SpryCollapsiblePanel.js" type="text/javascript">
</script>
<link href="../../overland/SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/atom+xml" title="Feed" href="http://page2rss.com/atom/9e272dc673279b3be1d6a46a2194cec2" />
<link rel="shortcut icon" href="/favicon.ico" />
<title>The Longest Way Home</title>
<meta name="description" content="This is

Here is the code from the 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"><script src="Scripts/AC_ActiveX.js" type="text/javascript"></script>
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript">
</script>
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript">
</script>
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/atom+xml" title="Feed" href="http://page2rss.com/atom/9e272dc673279b3be1d6a46a2194cec2" />
<link rel="shortcut icon" href="/favicon.ico" />
<title>The Longest Way Home</title>
<meta name="description" content="This is

Any ideas?

edbr
09-10-2008, 04:06 AM
i forget mostof the template details but in short in the template .dwt file make title an editable region, i thought it was default

davesite
09-10-2008, 04:22 AM
Do you know how I can do this?

I just know how to do it in design mode:mrgreen:

Do I just start like this <!-- TemplateBeginEditable name="backdrop" and at the end of the area <!-- TemplateEndEditable -->

Not sure about what name to put in?

I don't want to mess the site up!

edbr
09-10-2008, 05:20 AM
yes looks right, either side of the title tags. call it title :)

davesite
09-10-2008, 05:35 AM
Wow, it worked! :grin:

Thanks big time for that. Was worried I would mess the site up agian, not for the first time!!

I needed to do that in order to get the pages to spread a bit on the search engines, they have been just picking up on the one title.

Looks like I have some renaming to do now!!

Thanks again

Dave

domedia
09-10-2008, 12:57 PM
And then make sure that the remaining HEAD tags are in the right place.

davesite
09-10-2008, 03:12 PM
Thanks, I am at 7 errors on validation, including an issue with the headers. It's been a long standing one.

<!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"><!-- InstanceBegin template="/Templates/Journeys template.dwt" codeOutsideHTMLIsLocked="false" --><script src="Scripts/AC_ActiveX.js" type="text/javascript"></script>
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript">
</script>
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript">
</script>
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/atom+xml" title="Feed" href="http://page2rss.com/atom/9e272dc673279b3be1d6a46a2194cec2" />
<link rel="shortcut icon" href="/favicon.ico" />
<!-- InstanceBeginEditable name="metatitle" --><title>The Title</title>
<meta name="description" content="This is the travel site of a 33 year old guy who packed up and sold everything to go out into the world in search for a new home. This site gives you resources, along with his story, photography and help." />
<meta name="keywords" content="travel, traveling, travelogue, travel blog, travel site, resources, travel help, RTW, around the world, traveling for home, travel help, overland travel, searching for home, overland, traveling the world, travel adventure" />
<meta name="copyright" content="Copyright " />
<meta name="author" content="" />
<meta name="Charset" content="UTF-8" />
<meta name="Distribution" content="Global" />
<meta name="Rating" content="General" />
<meta name="Revisit-after" content="7 Days" />
<!-- InstanceEndEditable -->
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript">
</script>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<link href="style sheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
background-color: #666666;
}
.style33 {font-weight: bold}
div.c1 {text-align: center}
.style101 {font-size: 12px}
.style102 {font-size: 14px}
-->
</style>
</head>

Not sure if it's all right or not?

domedia
09-10-2008, 04:23 PM
No, all scripts and link to stylesheets needs top inside the head area.