Drupal 7:过期曝光过滤器 [英] Drupal 7: Exposed filter on a post date

查看:130
本文介绍了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);

Form element: Select;

Filter granularity: Year;

Date Fields: Post Date; Expose;

Filter type to expose: Single;

Operator: equal to;

Inform me if it works..

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

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