跳转到主要内容

Page Title 模块的安装与使用

安装以下步骤在您的drupal站点上安装page_title模块:

  1. Download the Page Title Module from drupal.org
  2. Unzip the files to your local computer
  3. Upload the folder to wherever you store your modules (either the /modules/ folder or /sites/all/modules/)
  4. Go to Administer > Site Building > Modules
  5. Check off the Page Title checkbox
  6. Click Save Configuration
  7. Edit the template.php file in your theme (if you do not have one, there is one included in the module download)
  8. 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; }

  9. Go to Administer > Content management > Page Title
  10. Set the Pattern for Individual Pages and the Pattern for Front Page
  11. Use the !page_title Token
  12. Go to any page and click Edit
  13. Add your desired title in the Page Title text field
  14. 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

文章分类