Drupal 7:在发布日期公开过滤器 [英] Drupal 7: Exposed filter on a post date

查看:22
本文介绍了Drupal 7:在发布日期公开过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个网站上有数百篇文章.我使用视图在一页上显示摘录和指向它们的链接,我还有一个分页器,当时可以显示 10 篇文章.我需要添加一个带有年份 [...,2008,2009...,2013] 的下拉列表.如果您在下拉列表中选择年份,则视图应仅显示该年份发布的文章.例如,如果在 2013 年添加了新文章,则下拉列表中的年份应自动更新,因此第一年是首次发表的年份.

I have couple hundreds of articles on a website. I use a view to show excerpts and links to them on one page and I also have a pager that show 10 articles at the time. I need to add a dropdown with years [...,2008,2009...,2013]. If you select a year in the dropdown, then view should only display articles that were posted in that year. Years in the dropdown should be updated automatically if a new article added in 2013 for example, and thus the first year is the year of the first publication.

请提出可能的解决方案.

Please suggest possible solutions.

推荐答案

我认为,您需要为视图列表设置公开过滤器.配置应该类似于--

I think, you need to set exposed filter to the view list. The configuration should be something like--

过滤条件:日期(节点);

Filter criteria: Date (node);

表单元素:选择;

过滤器粒度:年;

日期字段:发布日期;暴露;

Date Fields: Post Date; Expose;

要公开的过滤器类型:Single;

Filter type to expose: Single;

运算符:等于;

如果有效请通知我..

这篇关于Drupal 7:在发布日期公开过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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