Adding or Modifying Page Titles

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
fredrick1973
New Member
New Member
Posts: 5
Joined: Wed Oct 12, 2011 1:53 pm

Adding or Modifying Page Titles

Post by fredrick1973 »

My clients website needs some modifications. The page titles, description and keywords of every page needs to be modified. But, when I add the page meta data, the changes don't show up in the front end.

A default page title is showing up across all pages on the site.

I am adding the titles, description and keywords in "Page Specific Metadata:" section of Edit Content -> Options.

The format i use is

<meta name="title" content="">
<meta name="description" content="">
<meta name="keywords" content="">


the website is http://www.breakthroughcancerresearch.ie/

Please help to solve my problem.

Thanks in advance!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Adding or Modifying Page Titles

Post by Dr.CSS »

You have {metadata} tag in all of your templates?..

Also all meatadata needs a close on them some text, some more" />
NOTE: the 'space' then the / at the end...
fredrick1973
New Member
New Member
Posts: 5
Joined: Wed Oct 12, 2011 1:53 pm

Re: Adding or Modifying Page Titles

Post by fredrick1973 »

Dr.CSS wrote:You have {metadata} tag in all of your templates?..

Also all meatadata needs a close on them some text, some more" />
NOTE: the 'space' then the / at the end...
I am not sure about {metadata} tag in the templates? Where do I search for them? Where are they located?

Thanks
fredrick1973
New Member
New Member
Posts: 5
Joined: Wed Oct 12, 2011 1:53 pm

Re: Adding or Modifying Page Titles

Post by fredrick1973 »

I am not sure of {metadata} in all the templates. Kindly let me know where to find them? Where is the location?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Adding or Modifying Page Titles

Post by Dr.CSS »

The ones you have now are in Site Admin » Global Settings...

I look in the page template for the {metadata} tag, it should be in the top after <head>...
fredrick1973
New Member
New Member
Posts: 5
Joined: Wed Oct 12, 2011 1:53 pm

Re: Adding or Modifying Page Titles

Post by fredrick1973 »

This is the code in my theme file

* DisplayHTMLHeader
* This method outputs the HEAD section of the html page in the admin section.
*/
function DisplayHTMLHeader($showielink = false, $addt = '')
{
global $gCms;
$config =& $gCms->GetConfig();
?><head>
<meta name="Generator" content="CMS Made Simple - Copyright (C) 2004-9 Ted Kulp. All rights reserved." />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" />
<link rel="stylesheet" type="text/css" href="style.php" />


===============================
This is some code in my siteprefs.php

global $gCms;
$db =& $gCms->GetDb();

$error = "";
$message = "";

$clear_vc_cache = 0;
$disablesafemodewarning = 0;
$allowparamcheckwarnings = 0;
$enablenotifications = 1;
$sitedownexcludes = '';
$basic_attributes = '';
$enablecustom404 = "0";
$xmlmodulerepository = "";
$urlcheckversion = "";
$defaultdateformat = "";
$custom404 = "<p>Page not found<//p>";
$custom404template = "-1";
$enablesitedownmessage = "0";
$sitedownmessage = "<p>Site is currently down. Check back later.</p>";
$sitedownmessagetemplate = "-1";
$metadata = '';
$sitename = 'CMSMS Website';
$css_max_age = 0;
$frontendlang = '';
$frontendwysiwyg = '';
$nogcbwysiwyg = '0';
$global_umask = '022';
$logintheme = "default";



if (isset($_POST["cancel"])) {
redirect("index.php".$urlext);
return;
}


$global_umask = get_site_preference('global_umask',$global_umask);
$frontendlang = get_site_preference('frontendlang',$frontendlang);
$frontendwysiwyg = get_site_preference('frontendwysiwyg',$frontendwysiwyg);
$nogcbwysiwyg = get_site_preference('nogcbwysiwyg',$nogcbwysiwyg);
$enablecustom404 = get_site_preference('enablecustom404',$enablecustom404);
$custom404 = get_site_preference('custom404',$custom404);
$custom404template = get_site_preference('custom404template',$custom404template);
$enablesitedownmessage = get_site_preference('enablesitedownmessage',$enablesitedownmessage);
$sitedownmessage = get_site_preference('sitedownmessage',$sitedownmessage);
$xmlmodulerepository = get_site_preference('xmlmodulerepository',$xmlmodulerepository);
$urlcheckversion = get_site_preference('urlcheckversion',$urlcheckversion);
$defaultdateformat = get_site_preference('defaultdateformat',$defaultdateformat);
$logintheme = get_site_preference('logintheme',$logintheme);
$metadata = get_site_preference('metadata',$metadata);
$css_max_age = (int)get_site_preference('css_max_age',$css_max_age);
$sitename = get_site_preference('sitename',$sitename);
$clear_vc_cache = get_site_preference('clear_vc_cache',$clear_vc_cache);
$disablesafemodewarning = get_site_preference('disablesafemodewarning',$disablesafemodewarning);
$allowparamcheckwarnings = get_site_preference('allowparamcheckwarnings',$allowparamcheckwarnings);
$enablenotifications = get_site_preference('enablenotifications',$enablenotifications);
$sitedownexcludes = get_site_preference('sitedownexcludes',$sitedownexcludes);
$basic_attributes = get_site_preference('basic_attributes',$basic_attributes);

================================

Let me know if this helps or should I send both the complete files.

Thanks once again!
uniqu3

Re: Adding or Modifying Page Titles

Post by uniqu3 »

What you pasted here is part of admin theme file and sitepref.php that you should not edit.
With CMSMS you don't have to search for files and edit any, you can do all of your FrontEnd Template settings and markup in Admin Backend.

When you go to "Content -> Pages" you will see a list of your pages and in "Template" table column you will also see Template names which are used by these pages.

Now simply click on a Tempalte name and a page where you can edit that Template will open.
Now look if there is {metadata} in the code inside textarea. If not add it inside <head> some code </head> part.

When you have that part your meta settings that you entered when editing page under "Options" tab and settings from "Site Admin -> Global Settings" as DrCSS mentioned will be added.

And thats it.
fredrick1973
New Member
New Member
Posts: 5
Joined: Wed Oct 12, 2011 1:53 pm

Re: Adding or Modifying Page Titles

Post by fredrick1973 »

uniqu3 wrote:What you pasted here is part of admin theme file and sitepref.php that you should not edit.
With CMSMS you don't have to search for files and edit any, you can do all of your FrontEnd Template settings and markup in Admin Backend.

When you go to "Content -> Pages" you will see a list of your pages and in "Template" table column you will also see Template names which are used by these pages.

Now simply click on a Tempalte name and a page where you can edit that Template will open.
Now look if there is {metadata} in the code inside textarea. If not add it inside <head> some code </head> part.

When you have that part your meta settings that you entered when editing page under "Options" tab and settings from "Site Admin -> Global Settings" as DrCSS mentioned will be added.

And thats it.
Thanks for the info.

I tried to do as instructed but the Template name on the "Template" table column, is not clickable. Could this be because I don't have certain access levels in the admin or whatelse?

Thanks once again.
Locked

Return to “[locked] Installation, Setup and Upgrade”