自定义 Drupal 主题

自定义 Drupal 主题

2

= 网页布局:Page.tpl.php =
Page.tpl.php是负责网页布局的模板,这个模板控制整个页面的主框架。

在这个模板里,有以下变量可供使用:
+ head_title: 页面标题。
用法举例:<?php print $head_title ?> ...
+ language: 站点所使用的语言。
用法举例:" ...>
+ site: 站点名称
+ head: drupal_get_html_head() 函数产生的HTML代码
用法举例:...<?php print $head ?>
+ onload_attribute: Onload tags to be added to the head tag, to allow for autoexecution of attached scripts.
用法举例:
+ directory: 主题所在的目录,例如:themes/spreadfirefox 或 themes/box_grey
+ logo: logo图片的路径。在“管理->主题->配置”中可以对这个变量的值进行设置
用法举例:
<?php if ($logo) : ?>

" title="Home">"/>

<?php endif; ?>
+ site_name: 用于header的站点名称, empty when display has been disabled.
+ site_slogan: 网站的口号, empty when display has been disabled.
用法举例:
<?php if ($site_slogan) : ?>
<?php print($site_slogan) ?>
<?php endif;?>

+ search_box: True(1) if the search box has been enabled.
+ search_url: URL the search form is submitted to.
+ search_button_text: 搜索按钮的文字
+ search_description: 搜索按钮的描述文字
这四个变量的用法举例:
<?php if ($search_box) { ?>
" method="post" id="search">

" />

<?php } ?>

Hello! Good Site! Thanks

Hello! Good Site! Thanks you!

Posted by 游侠 (未验证) on 周四, 02/14/2008 - 00:14