-
Notifications
You must be signed in to change notification settings - Fork 10
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
NGSTACK-448 Implement active state on main menu via JS #34
Conversation
src/AppBundle/Resources/views/themes/app/pagelayout_variables.html.twig
Outdated
Show resolved
Hide resolved
src/AppBundle/Resources/views/themes/app/pagelayout_variables.html.twig
Outdated
Show resolved
Hide resolved
… into data-path variable on top page div
…, add data-location-id parameter on the menu items
…ering menus, we will not vary the ESI fragment by active item ID anymore
3494dec
to
8c50624
Compare
…es; just check location not empty in pagelayout; remove raw
…ck, to make clear what changes were applied compared to the original
@@ -32,7 +32,7 @@ | |||
|
|||
{% include '@NetgenSite/parts/facebook_api.html.twig' %} | |||
|
|||
<div id="page"{% if page_css_class|default is not empty %} class="{{ page_css_class }}"{% endif %}> | |||
<div id="page"{% if page_css_class|default is not empty %} class="{{ page_css_class }}"{% endif %}{% if location is defined and location is not empty %} data-path='["{{ location.path|join('","') }}"]'{% endif %}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@emodric I have completely remove the code block from the pagelayout_variables.html.twig. I am only doing the check for the location object here (exists and not empty) so it doesn't crash on module pages like search or tag view. Raw was removed as well as the slicing of the system root node.
Thanks @hknezevic ! |
Implement active state on main menu via JS