1
A
回答
0
通过获取视图副本并使用适当的过滤器,您可以非常容易地做到这一点。哎呀,你可以做到这一点在这里vid是路径的一部分,所以它适用于所有的词汇表。坚持...
是的,我认为这是我最近做的这个视图 - 只需复制/粘贴到查看导入
$view = new view;
$view->name = 'vocabulary';
$view->description = 'Displays all nodes in a vocabulary';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('sorts', array(
'sticky' => array(
'order' => 'DESC',
'id' => 'sticky',
'table' => 'node',
'field' => 'sticky',
'relationship' => 'none',
),
'created' => array(
'order' => 'DESC',
'granularity' => 'second',
'id' => 'created',
'table' => 'node',
'field' => 'created',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'vid' => array(
'default_action' => 'not found',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '%1',
'breadcrumb' => '',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'id' => 'vid',
'table' => 'vocabulary',
'field' => 'vid',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
'3' => 0,
'4' => 0,
'5' => 0,
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_fixed' => '',
'default_argument_user' => 0,
'default_argument_php' => '',
'validate_argument_node_type' => array(
'blog' => 0,
'poll' => 0,
'faq' => 0,
'forum' => 0,
'event' => 0,
'link' => 0,
'page' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'1' => 0,
'5' => 0,
'3' => 0,
'6' => 0,
'4' => 0,
'7' => 0,
'8' => 0,
'9' => 0,
'10' => 0,
'11' => 0,
'12' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 0,
'validate_argument_node_flag_name' => '*relationship*',
'validate_argument_node_flag_test' => 'flaggable',
'validate_argument_node_flag_id_type' => 'id',
'validate_argument_user_flag_name' => '*relationship*',
'validate_argument_user_flag_test' => 'flaggable',
'validate_argument_user_flag_id_type' => 'id',
'validate_argument_php' => '',
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('use_pager', '1');
$handler->override_option('row_plugin', 'node');
$handler->override_option('row_options', array(
'relationship' => 'none',
'build_mode' => 'teaser',
'links' => 1,
'comments' => 1,
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'vocabulary/%');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
相关问题
- 1. 词汇表:对象图中的路径?
- 2. Drupal分类标准块,词汇表
- 3. Drupal:从分类词汇词汇创建分层菜单
- 4. drupal 7 - 按分类词汇分组
- 5. 如何使用视图在Drupal 7上显示2级分类词汇列表
- 6. 如何从两个词汇表生成Drupal分类标准Breadcrumbs?
- 7. Drupal的:分类:请词汇可选特定内容类型
- 8. Drupal视图和路径网址
- 9. Drupal:视图分类树
- 10. 取决于词汇的不同taxonomy_term视图(Drupal)
- 11. Drupal6x:来自同一分类词汇表
- 12. 在drupal 6中显示词汇表
- 13. Drupal自动词汇表特定术语
- 14. 词汇表的词法分析
- 15. Drupal的路径
- 16. 具有最多1个父项的分类词汇表术语?
- 17. Drupal 7使用视图的分类块
- 18. Drupal的视图(页)对分类
- 19. Drupal:为我的自定义内容类型添加分类词汇字段
- 20. Drupal分类学:一个词可以有多个父母在同一个词汇中?
- 21. 如何在Drupal 7中关联两个词汇表
- 22. 基于词汇的Drupal更改显示
- 23. 隐藏某些Drupal用户的词汇
- 24. 如何重定向到Drupal 8中的视图路径?
- 25. 与分类项ID Drupal的节点路径
- 26. Drupal的分类项路径返回别名
- 27. Drupal的生活和分期的图像路径
- 28. Drupal 6:列出具有底层标记节点的分类词汇
- 29. 多个bezierpaths掩蔽视图的路径
- 30. 设置词汇列表的PHP OO类
谢谢!还有一件事:我已经定制了分类视图(我启用了视图中的默认视图)我应该手动对视图进行相同的更改以使它们具有可视性相同,还是有更快的方法? – aneuryzm 2010-08-16 07:02:44
我只想进入并对此视图进行相同的更改。它无论如何不是真正的_my_视图,它只是一个如何显示给定词汇表中所有节点的简单示例。如果你喜欢答案,你应该投票!莫名其妙地达到1500点。 :) – 2010-08-16 19:41:26
好的,那么我可以复制视图并过滤特定的内容类型,并且我拥有所有节点。对 ?好的,我会投票:) – aneuryzm 2010-08-17 08:08:52