Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible fix for active state of Node #76

Open
wants to merge 1 commit into
base: develop-v5
Choose a base branch
from

Conversation

robinbraibant
Copy link

Hi Jan

I noticed something odd when using pagination and the active state of a node.

The situation:
I go to the following URL: https://www.example.be/articles and the Node in the navigation linked to this entry becomes active and I can add some classes to it.
When I use pagination and go to the next page the URL becomes https://www.example.be/articles/p2 and the Node in the navigation linked to this entry loses its active state.

I then looked in the code and tried a possible fix.

Can you check it out and let me know what you think about it?

Greetings
Robin

@janhenckens janhenckens self-assigned this Aug 21, 2024
@janhenckens
Copy link
Member

Hey @robinbraibant, thanks for reporting that! I can instantly reproduce this on my own site, but it's a bit weird to have this top up now. I'll investigate a bit further to see if your change covers all the over cases (query params, pagination, etc).

You're on Craft 5 right?

@robinbraibant
Copy link
Author

robinbraibant commented Aug 22, 2024 via email

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