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

Subpages in menu,,,

Started by tkadlfgks 7 years ago · 1 replies · 590 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 Hanns Mattes, 16 hours ago
1 21 9 hours ago
General · by Andy Miller, 9 hours ago
0 21 9 hours ago
General · by Jerry Hunt, 5 days ago
2 143 2 days ago
General · by pamtbaau, 2 days ago
1 95 2 days ago
General · by Andy Miller, 2 days ago
0 79 2 days ago