PHP Drupal视图用于创建类别术语列表
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP Drupal视图用于创建类别术语列表相关的知识,希望对你有一定的参考价值。
$view = new stdClass();
$view->name = 'Categories';
$view->description = 'List of categories with number of articles posted in each category.';
$view->access = array (
0 => '1',
1 => '2',
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'Browse Articles';
$view->page_header = 'Browse articles by category.';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'teaser';
$view->url = 'articles';
$view->use_pager = TRUE;
$view->nodes_per_page = '100';
$view->block = TRUE;
$view->block_title = 'Categories';
$view->block_header = '';
$view->block_header_format = '1';
$view->block_footer = '';
$view->block_footer_format = '1';
$view->block_empty = '';
$view->block_empty_format = '1';
$view->block_type = 'list';
$view->nodes_per_block = '25';
$view->block_more = TRUE;
$view->block_use_page_header = FALSE;
$view->block_use_page_footer = FALSE;
$view->block_use_page_empty = FALSE;
$view->sort = array (
);
$view->argument = array (
array (
'type' => 'taxletter',
'argdefault' => '6',
'title' => '%1',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
);
$view->field = array (
array (
'tablename' => 'node',
'field' => 'title',
'label' => '',
'handler' => 'views_handler_field_nodelink',
'sortable' => '1',
'options' => 'link',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
);
$view->exposed_filter = array (
);
$view->requires = array(node);
$views[$view->name] = $view;
以上是关于PHP Drupal视图用于创建类别术语列表的主要内容,如果未能解决你的问题,请参考以下文章
Drupal 7 在视图中获取分类术语列表
按分类术语过滤的 Drupal 视图
创建一个 Drupal 视图,加载共享任何一个分类术语的所有文章(上下文过滤器)
Drupal 7 视图 - 按内容类型和分类术语分组
Drupal 在数组中搜索
drupal 7 - 按分类术语分组