Skip to content

Instantly share code, notes, and snippets.

@dustinwalker
Created February 18, 2014 15:57
Show Gist options
  • Save dustinwalker/9073705 to your computer and use it in GitHub Desktop.
Save dustinwalker/9073705 to your computer and use it in GitHub Desktop.
Add active class to current page or if page is child of current section
{% if FIELDNAME.id == entry.id or FIELDNAME.isDescendantOf(entry) %} class="active"{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment