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 →

"visible: false" having no effect on modular page navigation

Started by Muut Archive 10 years ago · 1 replies · 1112 views
10 years ago

I have a modular page made up of 5 different sections:

content:
items: '@self.modular'
order:
by: default
dir: asc
custom:

  • _gpcc-rpp
  • _gpcc-social
  • _gpcc-about
  • _gpcc-sponsors
  • _gpcc-gp

I have a navigation menu made up of these sections but I'd like some of them "gpcc=rpp" and "gpcc-social" to not appear in the nav menu. From reading documentation it appears setting "visible: false" in the markdown file frontmatter for each these sections should hide them from the navigation:

YAML
title: Hide from nav
menu: Home
visible: false

Despite having "visible: false" this is still appearing in the navigation. What am I missing?

Thanks.

10 years ago

Grav is not doing anything magical under the covers, most of that rendering logic happens in Twig. By default there should be logic in the navigation twig to ensure that only visible pages are displayed. There's probably not this same logic for the modular on-page menu twig loop.

What theme are you using? it's important because that's where the logic is contained.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Muut Archive, 10 years ago
1 672 1 week ago
Archive · by Deleted User, 9 years ago
0 3042 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5336 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago