开发者

Sort grouped nodes by taxonomy weight in views

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,开发者_JAVA技巧 what are the steps to make them ordered by weight?


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜