Skip to content

Keep search filter in session#19

Open
cepheiVV wants to merge 1 commit intogeorgringer:masterfrom
cepheiVV:master
Open

Keep search filter in session#19
cepheiVV wants to merge 1 commit intogeorgringer:masterfrom
cepheiVV:master

Conversation

@cepheiVV
Copy link

@cepheiVV cepheiVV commented Feb 11, 2024

This PR solves Issue #14 by saving the filter to the frontend user session.
The feature can be enabled in the flexform settings of the news plugin:

Screenshot 2024-02-11 at 18 47 38
  • when POST-ing a new filter request it saves the "Search" to the frontend user session
  • when reloading the page (eg. by changing a paginated page) the filter is loaded from the session if available
  • the news demand is set from the session data if available

(Also I removed dead code that previously was used to set the news demand, before the hook was introduced)

I implemented and tested this for TYPO3 v11
This will need more testing but it works fine for my v11 project.


<!-- Session Filter -->
<settings.keepFilterOnReload>
<TCEforms>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cepheiVV, TCEforms isn't "compatible" (?) with TYPO3 12 that's why the other options in this file don't have it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants