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 →

Subpages in menu,,,

Started by tkadlfgks 8 years ago · 1 replies · 844 views
8 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,,,,

8 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 themetman, 1 day ago
2 42 19 hours ago
General · by Hanns Mattes, 1 week ago
0 123 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago