I have a view where i am displaying data from one of the content type and i am filtering the data based on month and year, selected from the exposed date filter. I have added the date field in the content type so whenever a node gets added they user has to select the date as well(Month and year). Currently, the exposed month filter shows all the 12 months in the drop down. I want to show only the months that has data. For example - if there is data from the month January to April then only those months should be available in the drop down to filter the data. Is this possible through views or do i have to make use of hooks. And if i have to use hook then how. please suggest.

  • OTTOMH I can't remember if there is something like that available for Exposed filters but there is such an option for the Summary of the Contextual filter. The Summary usually gives you links that users click through to narrow down the results, not a drop-down. – prkos May 21 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.