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

Link in menu shouldn't be clickable

Started by Muut Archive 9 years ago · 2 replies · 536 views
9 years ago

Hello,

I am working on a custom theme, and I'm wondering how having an item in the menu not clickable.
The idea is to have this item be a title for its submenu.
My folders look like that :

TXT
01.index
02.title_of_submenu
-01.item1
-02.item2
-03.item3
03.page3

I tryed to not put a markdown file in 02.title_of_submenu, obviously it won't work.
I tryed to put url:javascript(void)

So how could I do ?
I didn't find in the docs, but if there is documentation about this, I would be happy to read it ! :)

9 years ago

If a page has no markdown file, it's not routable by default - see docs - and in the code that builds the menu, check if page.routable and if not, do not add the link.

9 years ago

Awesome, thank you so much ! :)
It works like a charm.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1322 9 years ago
Archive · by Muut Archive, 9 years ago
2 917 9 years ago
Archive · by Muut Archive, 9 years ago
2 4048 9 years ago
Archive · by Muut Archive, 9 years ago
1 2922 9 years ago
Archive · by Muut Archive, 9 years ago
3 1106 9 years ago