I am trying to get Page Title module to work with my GreenNBlack theme so that I can change the Title tags on articles. After adding the following code (according to the Page Title module instructions), whenever I submit a modification to an article the page does not refresh automatically. I can refresh it manually, but then it comes back with an error that I can't modify the page because it's already been modified (although it does modify the title tag). This is a problem because I have writers uploading content for me and I can't have them having to deal with this. I've tested other themes and it works fine, however I'm not quite ready to change the theme on this site. I'd prefer not to have to do that.

Thanks for any help in sorting this out - Cheryl

function _phptemplate_variables($hook, $vars) {
$vars = array();
if ($hook == 'page') {

// These are the only important lines
if (module_exists('page_title')) {
$vars['head_title'] = page_title_page_get_title();
}

}
return $vars;
}

Comments

marlandc’s picture

Does anyone have any idea how to get this to work? The GreenNBlack template.php does not have this function, it needed to be added. Is that the problem? Is there something else that this function relies on?

I'd really like to be able to change my title tags. Thanks.

marlandc’s picture

I decided to take another look at this and put this function first. I don't know why that made a difference, but it did and I'm able to create the title tags now. Problem solved.

cmstuning’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.