Closed Zarxrax closed 4 years ago
Your theme is likely not evaluating the page.hidden
variable. Make sure that there's a not page.hidden
condition in the {% for %}
loop of your index.twig
, like in the following example:
<ul class="nav">
{% for page in pages if not page.hidden %}
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
{% endfor %}
</ul>
That worked great, thanks!
I am trying to keep a page from being listed on my main menu. I see that in Pico version 2.0.1 that there is a "Hidden" meta header to manually hide a page in the pages list. I tried adding "Hidden: true" to my YAML for the page I want to hide, but this did not hide the page from the menu. Does additional code need to be added to my theme to support this? Or am I simply misunderstanding what this feature does?