按视图中的分类权重对分组节点进行排序
我有一个包含 4 个分类术语的词汇表
- Term A
- Term B
- Term C
- Term D
,并且有一些节点按分类术语分组在视图中,因此结果看起来“
like this:
- Term 1
- Node 1
- Node 2
- Term B
- Node 3
- Node 4
... and so on...
然后我对术语进行了重新排序”,但是当我在视图页面上查看时没有任何变化。还是一样的顺序。那么,请问按重量排序的步骤是什么?
I have one vocabulary with 4 taxonomy terms
- Term A
- Term B
- Term C
- Term D
and there are some nodes which I grouped in views by taxonomy term, so the result looks
like this:
- Term 1
- Node 1
- Node 2
- Term B
- Node 3
- Node 4
... and so on...
Then I reordered terms, but there is no change when I look on the views page. Still the same order. So, please, what are the steps to make them ordered by weight?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我自己回答这个问题..希望它能帮助一些人..
在视图中只需添加
'Relationship' ->内容:节点上的分类术语
,然后您可以在'排序条件' -> 中添加(术语)分类术语:权重(asc)
就这样
I'll answer this question myself.. hope, that it helps some people..
In views just add
'Relationship' -> Content: Taxonomy terms on node
and then You can add in'Sort criteria' -> (term) Taxonomy term: Weight (asc)
That's all
对我来说,即使添加了“'关系' - >内容:节点上的分类术语”,“'排序标准' - >(术语)分类术语:权重”仍然不可用。
我发现在管理/结构/视图/设置/高级下检查“禁用视图数据缓存”后,它变得可用(以及许多其他排序和过滤标准)。
我注意到只有在远程主机上才需要检查“禁用视图数据缓存”,而不是在本地主机上。
我不知道为什么会这样(我不是 drupal 专家),但也许它可以帮助别人。
For me even after adding the "'Relationship' -> Content: Taxonomy terms on node" the "'Sort criteria' -> (term) Taxonomy term: Weight " was still not available.
I found out that after checking "disable views data caching" under admin/structure/views/settings/advanced it became available (as well as a lot of other sort and filter criterias).
I noticed that checking "disable views data caching" was only necessary on remote host not on localhost.
I have no idea why this is so (I am not a drupal expert), but maybe it can help someone.