Php Drupal 6-样式页面H1标签

Php Drupal 6-样式页面H1标签,php,drupal-6,Php,Drupal 6,我有一个带有标准h1标记的page.tpl.php: <h1><?php print $title ?></h1> 一切都很好与世界,然而,我想使用aimge风格我的H1标签字体。这一切都很好,但这些都是唯一的,所以我需要添加一个类到h1标记,以便我的所有主要部分都是唯一的 我的想法是使用php在每个主页上获取一些独特的内容…URL是唯一的,因此我获取: <div class="<?php print $current_path = drup

我有一个带有标准h1标记的page.tpl.php:

<h1><?php print $title ?></h1>

一切都很好与世界,然而,我想使用aimge风格我的H1标签字体。这一切都很好,但这些都是唯一的,所以我需要添加一个类到h1标记,以便我的所有主要部分都是唯一的

我的想法是使用php在每个主页上获取一些独特的内容…URL是唯一的,因此我获取:

<div class="<?php print $current_path = drupal_get_path_alias($_GET["q"]);?>"><h1><?php print $title ?></h1></div>

据我所知,至少在css2.x中,所有类名都必须以
-
\uu
或字母
a-z
开头。因此,
70s-
将不是有效的类名

一个快速修复方法是在类前面加前缀:

<div class="<?php print 'title-' . $current_path = drupal_get_path_alias($_GET["q"]);?>">
    <h1><?php print $title ?></h1>
</div>

<div class="70s-books-and-toys"><h1><?php print $title ?></h1></div>
<div class="<?php print 'title-' . $current_path = drupal_get_path_alias($_GET["q"]);?>">
    <h1><?php print $title ?></h1>
</div>
 <h1 class="<?php print 'title-' . $current_path = drupal_get_path_alias($_GET["q"]);?>">
       <?php print $title ?>
 </h1>