Page Title 模块的安装与使用
安装以下步骤在您的drupal站点上安装page_title模块:
- Download the Page Title Module from drupal.org
- Unzip the files to your local computer
- Upload the folder to wherever you store your modules (either the /modules/ folder or /sites/all/modules/)
- Go to Administer > Site Building > Modules
- Check off the Page Title checkbox
- Click Save Configuration
- Edit the template.php file in your theme (if you do not have one, there is one included in the module download)
- Add the follow code (if the function already exists then just add the important lines) :
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; }
- Go to Administer > Content management > Page Title
- Set the Pattern for Individual Pages and the Pattern for Front Page
- Use the !page_title Token
- Go to any page and click Edit
- Add your desired title in the Page Title text field
- Submit your page
If you are having trouble with this install then just open the README.txt file that is included with the module download. You may also want visit the Drupal website and read about the module. There is a spot on the forum where you can browse issues that others are having or add your own.
原文链接:http://www.seodrupal.org/tutorials/installing-page-title-module
文章分类
标签