Drupal 视图:根据 CCK 字段设置限制显示的结果
我有一个视图,可以提取提要项目(从各种“所有者提要”以使用提要模块术语),然后按日期对它们进行排序(非常重要)。所有者提要有一个用于提要类型(Twitter、博客等)的 CCK 字段,理论上 CCK 字段用于限制视图中显示的提要项目的数量。 (限制的原因是 Twitter 占主导地位,但我们想要一些博客等,所以我不想在显示我的第一个博客之前必须显示 100 条推文。)
我猜测某种 Views 挂钩代码是按顺序,但我不确定是哪一个。也许是允许直接修改查询的钩子...
请注意,所有者提要 nid 正在通过关系拉入视图中。
提前致谢!
I have a view that pulls in feed items (from various "Owner feeds" to use the feeds module lingo), then sorts them by date (very important). The owner feed has a CCK field for the type of feed (Twitter, Blog, etc.) and a CCK field theoretically to limit the number of feed items displayed in the view. (The reason for the limit is that Twitter dominates, but we want some blogs, etc., so I don't want to have to show 100 tweets before displaying my first blog.)
I'm guessing some sort of Views hook code is in order, but I'm not sure which one. Perhaps the hook that allows direct modification of the query...
Note that the Owner feed nid is being pulled into the view via a Relationship.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用视图中的参数字段,您可以首先选择节点类型,然后选择节点发布日期。
通过这种方式,您可以在按日期排序之前优先考虑博客类型。
您还可以考虑构建两个视图,例如排名前 5 的博客项目和排名前 20 的 Twitter 提要...
Using the Arguments field in the view, you could first select the node type, then node post date.
In this way you could give priority to the blog type, before sorting by date.
You could also consider building two Views, for instance the top 5 blog items and the top 20 Twitter feeds...