Problem/Motivation

I have a month and week calendar view. I also have some filters exposed which visitors can use to select to filter content. Problem is when a user is on a previous month/week view and uses a filter, the view jumps back to the current month/week.

Steps to reproduce

Navigate to a previous or next month/week. There is a list of results on different days.

Use one or more filters and click filter.

View jumps back to current month, so you have to navigate again to the month you selected before. There are the filtered results but it's not very handy.

Would it be possible to filter on a certain month/week, but stay in that month/week? I tried with ajax turned on and off.

Thx
Kris

CommentFileSizeAuthor
#3 Screenshot-202401272227-652x228.png28.86 KBgge

Comments

blueblot created an issue. See original summary.

lobodakyrylo’s picture

I have the same problem

gge’s picture

StatusFileSize
new28.86 KB

You could try #2681953-45: Allow exposed form to preserve URL query parameters and if using B.E.F you also need #3119947: Allow exposed form to preserve URL query parameters. Then go to the settings of the "Exposed form style" and fill out the "Preserve query parameters from URL".

matthieuscarset’s picture

Status: Active » Needs review
Related issues: +#3356959: Jump to month/year

There is a new `calendar_timestamp` filter available (on 2.1.x dev branch for now).

You could add this filter to the view - without necessarily exposing it - and it should keep track of the URL query parameter.

You should stay on the same "page".

Hope it fix the situation.

Could you please review and let me know? Thanks!

lexfunk’s picture

Applying the patches mentioned in #3 and configuring the "Preserve query parameters from URL" with "calendar_timestamp" is working for me. Thank you!

matthieuscarset’s picture

Status: Needs review » Fixed

Thanks @gge @lexfunk

I'm glad there is an easy fix with this MR for the core and another if you're using BEF (see #3 as commented above).

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.