Skip to content

Instantly share code, notes, and snippets.

@iainurquhart
Last active December 20, 2015 00:49
Show Gist options
  • Save iainurquhart/6044414 to your computer and use it in GitHub Desktop.
Save iainurquhart/6044414 to your computer and use it in GitHub Desktop.
{exp:channel:entries channel="some_pages" limit="1"}
{exp:taxonomy:set_node
tree_id="2"
entry_id="{entry_id}"
add_globals="yes"
}
<p>You are here:
{exp:taxonomy:breadcrumbs}
{if here}
{node_title}
{if:else}
<a href="{node_url}">{node_title}</a> &rarr;
{/if}
{/exp:taxonomy:breadcrumbs}
</p>
<h1>{title}</h1>
<div class="kicker">
{page_introduction}
</div>
{if this_node_has_children}
<h3>In this section</h3>
{exp:taxonomy:entries parent_entry_id="{entry_id}" dynamic="no"}
<article class="{if tx:count == 1}first_post {/if}post medium">
<h2><a href="{exp:taxonomy:node_url entry_id="{tx:entry_id}"}">{tx:title}</a></h2>
<p>{tx:page_introduction}</p>
</article>
{/exp:taxonomy:entries}
{/if}
<nav>
{exp:taxonomy:nav}
<li><a href="{node_url}">{node_title}</a>{children}</li>
{/exp:taxonomy:nav}
</nav>
{/exp:channel:entries}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment