Page title tag

20 posts by 2 authors in: Forums > CMS Builder
Last Post: July 2, 2008   (RSS)

Re: [chassa2556] Page title tag

By Dave - July 1, 2008

The meta tags aren't there or the content of the meta tags aren't there? Try adding something else to the page and then look for it in view source to make sure you're editing the right file. If that works double check you have values saved for the record for meta_description, and metakeywords.
Dave Edis - Senior Developer
interactivetools.com

By chassa2556 - July 2, 2008

This is the code

<title><?php echo $pagesRecord['pagetitle'] ?></title>
<META NAME="KeyWords" CONTENT="<?php $pagesRecord['metakeywords']; ?>">
<META NAME="Description" CONTENT="<?php $pagesRecord['meta_description']; ?>">

...and this is what I get in the source code - note the title tag works.

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META NAME="Description" CONTENT="">
<META NAME="KeyWords" CONTENT="">
<title>The Dower House, Straloch estate</title>

<style type="text/css">

Re: [chassa2556] Page title tag

By Dave - July 2, 2008

Hi Charles,

Try adding this temporarily to see all the available fields:

<xmp><?php print_r($pagesRecord); ?></xmp>

Let me know what that says.
Dave Edis - Senior Developer
interactivetools.com

By chassa2556 - July 2, 2008

Sorry not with you there Dave?

Re: [chassa2556] Page title tag

By Dave - July 2, 2008

Try adding the following tag (in red) just below your body tag. It will display a list of all the fields that are available. It's very odd that nothing is showing for metakeywords and meta_description.

<title><?php echo $pagesRecord['pagetitle'] ?></title>
<META NAME="KeyWords" CONTENT="<?php $pagesRecord['metakeywords']; ?>">
<META NAME="Description" CONTENT="<?php $pagesRecord['meta_description']; ?>">
...
<body>

<xmp><?php print_r($pagesRecord); ?></xmp>


Once you add that it will display a list of all the available fields in $pageRecord. Just copy and paste that and then remove the tag again.
Dave Edis - Senior Developer
interactivetools.com

By chassa2556 - July 2, 2008

I've run out of time on this job - I wonder could I ask you to fix it for me Dave? You have my details with straloch.com

Re: [chassa2556] Page title tag

By Dave - July 2, 2008

Sure, I can have a look. Just email me at dave@interactivetools.com the url to this page you're having trouble with.
Dave Edis - Senior Developer
interactivetools.com

By Dave - July 2, 2008

We figured this one out. I had missed the echo in the PHP tag:

<title><?php echo $pagesRecord['pagetitle'] ?></title>
<META NAME="KeyWords" CONTENT="<?php echo $pagesRecord['metakeywords']; ?>">
<META NAME="Description" CONTENT="<?php echo $pagesRecord['meta_description']; ?>">

It working now. And whenever you need to add new tags you can always use the code generator to create a list of them and just copy and paste the ones you need. It never forgets the echo part! :)

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

By chassa2556 - July 2, 2008

Thanks for fixing it Dave