创建一个Drupal视图,列出最多的投票节点按月份 [英] Create a Drupal view with a list of top voted nodes by month

查看:170
本文介绍了创建一个Drupal视图,列出最多的投票节点按月份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Drupal 6 Views模块来请求使用fivestar模块评分的顶级节点。然而,我似乎无法找出如何创建一个视图来请求每个月的最高投票节点,并将其显示在列表中。

I'm using the Drupal 6 Views module to request for top nodes rated using the fivestar module. However, I can't seem to find out how I can create a view to request for the top voted node for each month and display them on a list.

我是什么因此,结果是这样的列表:

What I'd like as a result is a list like this:


  • 2011年1月:大多数投票的节点标题为该节点的链接

  • 2010年12月:多数投票的节点标题为该节点的链接

  • 2010年11月:大多数投票节点标题为该节点的链接

  • ...

  • January 2011: Most voted node title an link to that node
  • December 2010: Most voted node title an link to that node
  • November 2010: Most voted node title an link to that node
  • ...

我甚至不确定是否可以使用Views?

I'm not even sure this is possible using Views?

推荐答案

以投票关系设定您的观点。
(更多信息) http://www.lullabot.com / videos / building-views-fivestar-and-votingapi

Set up your view with the voting relationship. (more info here http://www.lullabot.com/videos/building-views-fivestar-and-votingapi)

确保按投票结果降序排序。
根据上面的例子,只需添加节点标题字段并勾选将此字段链接到其节点。

Make sure you sort by vote result descending. According to your example above, just add the Node Title field and checkmark "link this field to its node".

其次,您需要对您的列表进行分组基于日期值。

Secondly, you need to group your listing based on a date value.


  1. 添加字段节点发布日期。复选标记从显示中排除。将日期格式设置为FY的自定义值(即月份,即2011年3月)

  2. 开箱即用的视图不支持将每个组限制为一定数量,因此您需要下载视图限制分组模块(在drupal.org上搜索)

  3. 安装后,将视图样式更改为分组字段,并将项目限制为1.

这应该是诀窍。

这篇关于创建一个Drupal视图,列出最多的投票节点按月份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆