I have a list of events, which I would like to filter by month, using button-style links. Installed the Better Exposed Filter module, but there is no "link" option. Did someone met "Filter by month" scenario in BackdropCMS so far?

Comments

klonos's picture

Hello ,

Have you tried https://drupal.stackexchange.com/questions/261310/d8-views-contextual-filter-by-month-year-content-date-field? It would be great to see if this works in D8 and/or vanilla Views 7.x, and if we are behind in any feature that supports implementing something like this in Backdrop.

I think that this is not supported in Views/Date/core yet (I might be wrong though), and if my research is right, then this is the issue to follow: https://www.drupal.org/project/drupal/issues/2868014. That issue is still in "needs work", but I've come across articles that mention "Filter Granularity" (like https://www.drupal.org/forum/support/post-installation/2013-12-23/answered-filter-criteria-in-views) and also https://www.drupal.org/forum/support/post-installation/2012-12-16/how-to-show-only-current-month-content-in-a-view and https://www.drupal.org/forum/support/post-installation/2012-03-28/views-making-a-date-filter-by-month-only-returns-all

So it seems that this may require some further research and trial/error to implement. Please do report back if you manage to find a way.

@klonos thank you for doing the research... at least the first link looks familiar:-)

@BWPanda yes, this could be an explanation, thank you

I tried with both

  • Better Exposed Filter (does not provide the "show as link" option)
  • Creating a filter block in Views (using context filter)

None them worked. The point is, I have several D7 sites (see screnshot) where I could take the settings from for the second solution)... so I assume these settings are correct.

What could be the simpler way to get this working for a current project? Adaptions on BEF, Date Field or a custom module? (sure, in the long term, all of them would be great;-)