Default theme: Navigation: Hide pages starting with a underscore (_)

pico-3.0-alpha
Daniel Rudolf 9 years ago
parent b712650678
commit b493ebdb84
No known key found for this signature in database
GPG Key ID: A061F02CD8DE4538
  1. 2
      themes/default/index.twig

@ -28,7 +28,7 @@
</h1> </h1>
<div id="nav" role="region" tabindex="-1"> <div id="nav" role="region" tabindex="-1">
<ul> <ul>
{% for page in pages if page.title %} {% for page in pages if page.title and not (page.id starts with "_") %}
{% set pageDepth = page.id|split('/')|length %} {% set pageDepth = page.id|split('/')|length %}
{% if (pageDepth == 2) and (page.id ends with "/index") or (pageDepth == 1) %} {% if (pageDepth == 2) and (page.id ends with "/index") or (pageDepth == 1) %}
<li{% if page.id == current_page.id %} class="active"{% endif %}> <li{% if page.id == current_page.id %} class="active"{% endif %}>

Loading…
Cancel
Save