【问题标题】:$Body_Classes Variable in DrupalDrupal 中的 $Body_Classes 变量
【发布时间】:2009-08-27 16:18:12
【问题描述】:

我在 Drupal 中使用 Zen 主题,发现我可以通过 template.php 中的 _preprocess_page 函数访问 $body_classes 变量。

我想知道$body_classes 变量究竟是如何填充的?单边栏等术语从何而来?

谢谢

【问题讨论】:

    标签: drupal drupal-6 themes


    【解决方案1】:

    $body_classes 由 Zen 的 template.php 文件中的 zen_preprocess_page() 构造。

    【讨论】:

    • 它们首先通过template_preprocess_page生成:api.drupal.org/api/function/template_preprocess_page/6
    • 感谢 jhedstrom,这正是我想要的。该文件根据它对首先在 theme.info 文件中定义的变量做出的一些决定来分配类名。现在我知道我可以更改/添加什么以及我应该留下什么。 :-)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多