跳转到主要内容
微笑的天使 提交于 13 July 2009

在主题配置页面,由主题输出的各种页面元素都可以被启用或者禁用.配置页面位于"Administer > Site building > Themes > themeName".例如,在该页面上,取消对"Site slogan"的选中,就可以禁用掉站点标语(slogan)了.

Features enabled

         这些复选框,是根据.info文件中的特性(features)生成的.声明方式为'features'+“[]”+“=”+特性本身,例如features[] = the_feature。如果一个也没有定义的话,将会使用下面的默认值

features[] = logo features[] = name features[] = slogan features[] = mission features[] = node_user_picture features[] = comment_user_picture features[] = search features[] = favicon features[] = primary_links features[] = secondary_links  

为了禁用一些特性,只需要在.info文件中添加你需要的特性就可以了。定义需要的,就会将不需要的忽略掉。有些特性也会启用一些相关的表单字段。例如,'logo'将启用一个上传字段,用于上传图片。

一些注意点:

  • .info文件中的内容被缓存了。所以对它的修改都不会显示出来。(不要将它与主题注册表混淆了。)为了清空缓存,你可以这样:
    • 点击位于"Administer > Site configuration > Performance"的清空(Clear)按钮
    • 如果启用了devel区块的话(devel模块生成的),点击链接"Empty cache"。
    • 简单的访问主题选择页面"Administer > Site building > Themes"。

 

  • 已不再支持hook_features()

 

Taxonomy upgrade extras