Skip to content
Snippets Groups Projects
Commit e9ab0ba6 authored by Nicholas Thompson's avatar Nicholas Thompson
Browse files

updating the README.txt

parent 50a292bd
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ INSTALLATION:
2. Enable this module by navigating to:
Administer > Build > Modules
Administration > Modules
At this point the Drupal install system will attempt to create the database
table page_title. You should see a message confirming success or
......@@ -39,42 +39,12 @@ INSTALLATION:
database:
CREATE TABLE `page_title` (
`nid` INT NOT NULL ,
`page_title` VARCHAR( 128 ) NOT NULL ,
PRIMARY KEY ( `nid` )
) /*!40100 DEFAULT CHARACTER SET utf8 */;
`type` varchar(15) NOT NULL default 'node',
`id` int(10) unsigned NOT NULL default '0',
`page_title` varchar(255) NOT NULL default '',
PRIMARY KEY (`type`,`id`)
);
3. Optionally configure the two variations of page title by visiting:
Administer > Content management > Page titles
4. The page title is ultimately set at the theme level. To let your PHPTemplate
based theme interact with this module, you need to add some code to the template.php
file that comes with your theme. If there is no template.php file, you can simply
use the one included with this download. Here is the code:
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;
}
As you can see from the code comment, there are only three important lines
of code:
if (module_exists('page_title')) {
$vars['head_title'] = page_title_page_get_title();
}
These lines need to be added to the 'page' hook of the _phptemplate_variables
function.
Alternately, you can call page_title_page_get_title() from page.tpl.php
directly at the place where the title tag is generated.
Administration > Configuration > Search and metadata
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment