Closed (fixed)
Project:
Framework
Version:
5.x-2.1
Component:
Miscellaneous
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2008 at 06:07 UTC
Updated:
24 Dec 2008 at 06:45 UTC
Though Framework was the first choice of them for my website, I had to lose it because I was unable to use the Page Title module (http://drupal.org/project/page_title) to create custom page titles for nodes.
To do this I have to add a certain code in template.php:
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;
} When I attempt this with the Framework theme, my drupal site crashes. Could anyone please guide me how to use it. Here are the installation instructions for page_title module - http://drupal.org/node/254765
Comments
Comment #1
andregriffin commentedThis is a super easy fix. If you'll notice in the instructions, "These lines need to be added to the 'page' hook of the _phptemplate_variables function."
The code in template.php you need to change looks like this
It needs to be altered like so:
Comment #2
andregriffin commentedThis modification has been included in Framework 5.x-2.2
Comment #3
deadlyminds commentedThanks Andre. Appreciate i. I've downloaded the latest version of Framework. Another dumb question - Do i still need to add the code in the 2.2 version?
Comment #4
andregriffin commentedI've added the code into 5.x-2.2. You no longer need to add it. For Drupal 6, it is my understanding that the module does not require this modification.
Comment #5
deadlyminds commentedThanks. It's working now!