Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Subpages in menu,,,

Started by tkadlfgks 7 years ago · 1 replies · 752 views
7 years ago

Hi,

I’m just starting to use Grav and i think it’s an amazing tool. However, I’m trying to display subpages in the menu.

I am using receptar skeletton/theme and I’d like to display subpages in blogs folder (ie : /user/pages/01.blog/*/item.md) in the main menu. I could have created folders for each page in /user/pages/ but I’d like to show preview on the main page (/blog) like blog posts.

Can someone give me a hint, or something, a trick to do this ?

Thanks in advance,,,,

7 years ago

@dyjorgj3562:
receptar

Hi @dyjorgj3562, looking at the theme and skeleton I think you need to create a file called receptar.yaml in the folder /user/config/themes/ and in that file put this:

YAML
showchildpages:
   enabled: true 

Then for each blog entry you want visible in the child menu, set the visible of that page to true, like this:

TXT
visible: true

Let me know if you can get things going.
ps - if you want to see the code (Twig) related to displaying child menu items it is at https://github.com/getgrav/grav-theme-receptar/blob/develop/templates/partials/navigation.html.twig#L19-L30

Suggested topics

Topic Participants Replies Views Activity
General · by Andy Miller, 6 days ago
0 111 6 days ago
General · by lynbor, 1 month ago
3 439 2 weeks ago
General · by lynbor, 3 weeks ago
7 562 2 weeks ago
General · by Harry, 2 weeks ago
0 161 2 weeks ago
General · by Old Man Umby, 1 month ago
2 309 3 weeks ago