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

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

Started by Muut Archive 9 years ago · 1 replies · 851 views
9 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.

9 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 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