Skip to Content

Drupal 主题

  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Declaration of views_handler_argument::init() should be compatible with views_handler::init(&$view, $options) in /var/www/drupal_module/views/handlers/views_handler_argument.inc on line 0.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /var/www/drupal_module/views/handlers/views_handler_filter.inc on line 0.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /var/www/drupal_module/views/handlers/views_handler_filter.inc on line 0.
  • strict warning: Declaration of views_handler_filter_node_status::operator_form() should be compatible with views_handler_filter::operator_form(&$form, &$form_state) in /var/www/drupal_module/views/modules/node/views_handler_filter_node_status.inc on line 0.
  • strict warning: Declaration of views_plugin_style_default::options() should be compatible with views_object::options() in /var/www/drupal_module/views/plugins/views_plugin_style_default.inc on line 0.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /var/www/drupal_module/views/plugins/views_plugin_row.inc on line 0.
  • strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /var/www/drupal_module/views/plugins/views_plugin_row.inc on line 0.
  • strict warning: Only variables should be passed by reference in /var/www/truevue.org/sites/all/themes/zeropoint/template.php on line 341.
  • strict warning: Only variables should be passed by reference in /var/www/truevue.org/sites/all/themes/zeropoint/template.php on line 341.
  • strict warning: Only variables should be passed by reference in /var/www/truevue.org/sites/all/themes/zeropoint/template.php on line 341.
  • strict warning: Only variables should be passed by reference in /var/www/truevue.org/sites/all/themes/zeropoint/template.php on line 341.
  • strict warning: Only variables should be passed by reference in /var/www/truevue.org/sites/all/themes/zeropoint/template.php on line 341.
  • strict warning: Only variables should be passed by reference in /var/www/truevue.org/sites/all/themes/zeropoint/template.php on line 341.
  • strict warning: Only variables should be passed by reference in /var/www/truevue.org/sites/all/themes/zeropoint/template.php on line 341.
  • strict warning: Only variables should be passed by reference in /var/www/truevue.org/sites/all/themes/zeropoint/template.php on line 341.
  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Declaration of views_handler_field_comment::init() should be compatible with views_handler_field::init(&$view, $options) in /var/www/drupal_module/views/modules/comment/views_handler_field_comment.inc on line 0.
  • strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /var/www/drupal_module/views/handlers/views_handler_filter_boolean_operator.inc on line 0.

Drupal主题:标签(Taxonomy Term)按类别显示

在Wordpress中,标签会按照类别显示。不过Wordpress就两种标签:文章分类和标签。在Drupal中,你可以创建不同类型的标签,如:文章分类,文章地点,涉及人物,天气等等类型(Vocabulary)。但是默认时会将这些标签(Taxonomy Terms)显示在一起,我们可以用下面的代码将这些标签按类别分开显示:

Drupal主题:为摘要(teaser)页面制作专门的主题模板

有下面的三种方法可以为摘要页面制作单独的主题:

方法一:

<?php
if ($teaser) { 
  // node is being displayed as a teaser
  // Anything here will show up when the teaser of the post is viewed in your taxonomies or front page
} else { 
  //all other cases
  //Anything here will show up when viewing your post at any other time, e.g. previews
}
?>