Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
page_title
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
page_title
Commits
e9ab0ba6
Commit
e9ab0ba6
authored
13 years ago
by
Nicholas Thompson
Browse files
Options
Downloads
Patches
Plain Diff
updating the README.txt
parent
50a292bd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.txt
+7
-37
7 additions, 37 deletions
README.txt
with
7 additions
and
37 deletions
README.txt
+
7
−
37
View file @
e9ab0ba6
...
...
@@ -30,7 +30,7 @@ INSTALLATION:
2. Enable this module by navigating to:
Administ
er > Build
> Modules
Administ
ration
> 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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment