Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
set_node
{exp:channel:entries channel="static" limit="1" sort="asc"{if segment_2} require_entry="yes"{/if}}
{if no_results}{redirect="404"}{/if}
<html>
<head>
{exp:taxonomy:set_node tree_id="1" key="entry_id" val="{entry_id}" var_prefix="this_"}
{styles}
<title>{title} {if segment_2}// {exp:taxonomy:breadcrumbs titles_only="yes" reverse="yes" include_here="no" delimiter=" :: "}{/if}
</title>
</head>
<body>
<div id="container">
<div id="banner">
<h1>Static Pages in ExpressionEngine</h1>
<p>You are here: <a href="{path=}">Home</a> &rarr; {exp:taxonomy:breadcrumbs}</p>
</div>
<div id="sidebar-a">
{exp:taxonomy:nav auto_expand="yes"}
<a href="{node_url}">{node_title}</a>
{/exp:taxonomy:nav}
</div>
<div id="content">
<h2>{title}</h2>
{static_page_content}
{if this_node_has_children == 'yes'}
{embed="static/.teasers" entry_ids="{exp:taxonomy:get_children_ids}"}
{/if}
</div>
<div id="footer">
<p>Footer</p>
</div>
</div>
</body>
</html>
{/exp:channel:entries}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment