Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Top menu active stopped working on scrolling with modular

Started by Miedziaq 8 years ago · 0 replies · 780 views
8 years ago

Hello,

after some changes in menu and make site modular, menu stopped highlighting active item..

{% for module in page.collection() %}
{% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
<li><a class="{{ current_module }}" href="#{{ _self.pageLinkName(module.menu) }}">{{ module.menu }}</a></li>
{% endfor %}

this code showing the menu well, but all the modules are inactive on scrolling or click... how to fix it?

Suggested topics

Topic Participants Replies Views Activity
Content & Markdown · by Jochen, 1 year ago
6 1663 1 year ago
Content & Markdown · by Ton Haarmans, 2 years ago
10 1235 2 years ago
Content & Markdown · by Jan L'Am, 2 years ago
4 1099 2 years ago
Content & Markdown · by Leonardo, 2 years ago
3 1002 2 years ago
Content & Markdown · by belthasar, 2 years ago
4 1492 2 years ago