Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Content & Markdown

Keep collapsible menu open

Started by J. Boss 8 years ago · 1 replies · 813 views
8 years ago

Hi,

I'm fairly new to Grav and I need some help.
For a sidemenu I wanted to list all titles from the childpages of a certain parent with a collapsible menu.

In the cookbook I found exactly what I need.

I also changed this line:
{% for page in pages.children.visible %} with {% for page in page.find('/path/page').children %} to only show me the children from the current parent. (Tell me, if there is a better way.)

Now my problem is:
How i get it to work that the menu stays open?

Thanks in advance
Jboss

7 years ago

Hi,

sadly i don't found a solution for my problem.

To clarify my question:

I got this code from the cookbook, which creates a menu with my pages and their subpages.

My problem is when i'm on a subpage the menu is closed. How can i prevent that the menu is closing with every page load.

I hope you guys understand.

Maybe its better to ask on stackoverflow or similar but i will give it another try here.

<br>

JBoss

Suggested topics

Topic Participants Replies Views Activity
Content & Markdown · by Jochen, 8 months ago
6 103 8 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 187 1 year ago
Content & Markdown · by Jan L'Am, 1 year ago
4 148 1 year ago
Content & Markdown · by Leonardo, 1 year ago
3 63 1 year ago
Content & Markdown · by belthasar, 1 year ago
4 259 1 year ago