0
votes

I have content type called news. I have a view thats lists all the news. But now I would like to filter those by year and type. User could select from select menu / dropdown the publish year (2010, 2011, 2012 so on) and also the type of the news (taxonymy terms).

I was playing around with views exposed but I only got a text input field. Can I somehow get a select menu instead of normal input field? And also how can I list all the publish years when news are published to that select menu?

Should this be done even with views?

====

PAGE

Filter dropdowns: -type- -year-

Press releaseses listed down here according the filters.

1

1 Answers

0
votes

Select boxes will only be used in Views exposed filters when there is a finite number of possible values. In other words, if your field you want to filter on has something set in the 'allowed values' section you should have the option of a select box if you choose "FIELD NAME - Allowed Values" as the field to filter on in Views.

If your field has an unlimited amount of possible values, you could always write a custom module to create a block with a form that presents your select boxes and directs the user to the view (using the filter parameters of the view).