Skip to content

Instantly share code, notes, and snippets.

@iainurquhart
Last active December 27, 2015 06:39
Show Gist options
  • Save iainurquhart/7283484 to your computer and use it in GitHub Desktop.
Save iainurquhart/7283484 to your computer and use it in GitHub Desktop.
<div class="section-container auto" data-section>
{exp:taxonomy:nav
tree_id="2"
display_root="no"
style="linear"
}
{if node_level == 1}
<section{if node_level_count == 1} class="active"{/if}>
<p class="title" data-section-title>
<a href="#panel{node_level_count}">{node_title}</a>
</p>
{children}
</section>
{/if}
{if node_level == 2}
{if node_level_count == 1}
<div class="content" data-section-content>
{/if}
<p>{node_title}</p>
{children}
{if node_level_count == node_level_total_count}
</div>
{/if}
{/if}
{/exp:taxonomy:nav}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment