Drupal 视图结构
我有一个与 Drupal 理论/策略相关的问题。首先我想说我对 drupalling 世界很陌生,所以这个问题可能很愚蠢。我正在尝试开发/制作具有以下结构的网站的一部分:(
- 第一级)virtual_exhibitions:显示展览类别的概述。
- (第二级)主题、地点、人物:这是一个展览类别。
- (第三级)爱情、比利时、拿破仑:都是展览,每一个都会给出与展览主题相关的照片列表。
现在我创建了一个新的节点类型:虚拟展览。 我创建了一个词汇:展览类别。
现在为了创建结构,我使用了视图:
- 一个视图列出了选定类别中的所有节点,并带有指向该节点的链接。
- 一个视图即可列出所有类别。
现在我想知道这是否是 drupal 的方法,或者是否有更好的选择。这是可行的,但我不确定这是否是正确的方法。
与此相关的另一个问题,我想使用干净的网址:
- virtual_exhibitions
- virtual_exhibitions/themes, virtual_exhibitions/places, ...
- virtual_exhibitions/themes/love, virtual_exhibitions/places/belgium, ...
第一个很简单,我可以配置这个在视图 UI 中。第二个有点难,因为类别可以有特殊字符,如 ' 或 a 等。所以我需要一个原始版本(可以在路径自动中使用)事实上,最好是我的词汇表的默认链接term 重定向到此视图。因为使用路径自动配置词汇术语的 url 非常容易,然后我可以只使用词汇术语 url,而不是总是手动构建它。
我使用第二级视图的原因是因为它需要自定义布局,并且据我所知,不可能对特定词汇表的词汇术语进行样式设置。当您设置样式时,这种样式将用于所有词汇术语。
我希望我的描述有点清楚,并且有人可以就我如何最好地做到这一点给我一些评论。
i've a Drupal theory/strategy related question. First i want to say that i'm very new to the drupalling world, so this question can be quiet stupid. I'm trying to develop/make a part of a site that has the following structure:
- (level one) virtual_exhibitions: shows an overview of exhibition categories.
- (level two) themes, places, people: which is an exhibition category.
- (level three) love, belgium, napoleon: which are exhibitions, every one of there will give a list of photos related to the exhibition subject.
now i created a new node-type: virtual-exhibition.
and i created a vocabulary: exhibition-categories.
now to create the structure i used views:
- one view to list all the nodes from a selected category with a link to the node.
- one view to list all the categories.
now i was wondering if this is the drupal way to do this, or are there better alternatives. This is working, but i'm not sure if this is the right way.
Another question related to this, i want to use clean urls:
- virtual_exhibitions
- virtual_exhibitions/themes, virtual_exhibitions/places, ...
- virtual_exhibitions/themes/love, virtual_exhibitions/places/belgium, ...
The first one is easy, i can configure this in the views UI. The second one is a bit harder because the categories can have special characters like a ' or a , etc. So i need a raw version (as can be used in path auto) in fact it would be best that my default link of the vocabulary term redirects to this view. because the url of the vocabulary term is very easy to configure using path auto and then i can just use the vocabulary term url in stead of always building it manually.
The reason why i'm using a view for the second level is because it needs a custom layout and as far as i know it isn't possible to style a vocabulary-term of a specific vocabulary. When you style it this style will be used for all the vocabulary-terms.
i hope my description is a bit clear and that somebody can give me some remarks on how i best do this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想你可能想看看观点争论。
I think you might want to take a look on views arguments.