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

hinclude and active item #250

Closed
patie opened this issue Dec 19, 2014 · 5 comments
Closed

hinclude and active item #250

patie opened this issue Dec 19, 2014 · 5 comments

Comments

@patie
Copy link

patie commented Dec 19, 2014

Hi,

knpmenu bundle works great, but i have problem when using hinclude (refreshing partial view in browser)

its normal because hinclude in symfony2 calling url /_fragment... so knpmenu bundle dont know from this url which navigation item is active/current.. any idea how can solve this please ? thx

@stof
Copy link
Collaborator

stof commented Jan 9, 2015

you would need to register your own menu voter to determine the current item in a different way

@patie
Copy link
Author

patie commented Jan 9, 2015

probably you right, but i cannot find tutorial for this, in documentation are few lines who do not adequately explain imho :/

@stof
Copy link
Collaborator

stof commented Jan 9, 2015

Create a service implementing the VoterInterface of KnpMenu, and tag it with the knp_menu.voter tag. The doc about this is indeed missing. It is referenced by #236

@patie
Copy link
Author

patie commented Jan 9, 2015

i can try it again, thx

@wouterj
Copy link
Collaborator

wouterj commented Aug 28, 2015

Closing as this issue can be fixed by a custom voter, as explained by @stof. I hope you figured out how to do it! (please note that voters are now documented in the KnpMenu library)

@wouterj wouterj closed this as completed Aug 28, 2015
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

No branches or pull requests

3 participants