Skip to content

Instantly share code, notes, and snippets.

@dustinwalker
Created February 18, 2014 15:59
Show Gist options
  • Save dustinwalker/9073760 to your computer and use it in GitHub Desktop.
Save dustinwalker/9073760 to your computer and use it in GitHub Desktop.
Secondary navigation sample
{#
# SECTION_NAME is name of section to generate secondary navigation for
# parent, childernPages, child can be any name you choose.
#}
{% set parent = craft.entries.section('SECTION_NAME').slug(craft.request.getSegment(1)).first %}
{% set childrenPages = parent.getDescendants(1) %}
<ul>
{% for child in childrenPages %}
<li>{{ child.getLink() }}</li>
{% endfor %}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment