Drupal Views display newest content per taxonomy limit to one node

扶醉桌前 提交于 2019-12-04 17:57:05

This is possible with Views 3. I've tested this on D7, but should work on D6 also.

  1. Add a new view of type - Taxonomy terms
  2. Add relationship - Taxonomy term: Representative node
  3. Other - Use aggregation: Yes
  4. Add field - Content: Title. Change Aggregation settings to Group results together

It's not great if you have a lot of nodes, but I've done this in other cases by using a filter for "Promoted to front page" - then you simple make sure you only promote one node at a time.

I'd suggest to use a combination of panels ans views. First, create a (or use the default) view for nodes which takes a taxonomy term as argument. Second, create a panels page containing five regions. Each region is to be filled with a view (in fact it's going to be the same view from step one, but with different arguments). Within panels ui you can restrict the number of shown entries of each view, set this value to one to have only one article be shown per term.

Panels: http://drupal.org/project/panels

Views: http://drupal.org/project/views

I'd recommend checking out the Views Group By module.

http://drupal.org/node/389230

The tutorial listed above actually describes almost exactly what you are trying to do.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!