::use 'layout.mtt'::
<header class="hero-unit-small">
	<div class="container">
		<div class="row">
			<div id="title">Haxe Code Cookbook</div>
		</div>
	</div>
</header>
<main class="container">
	<section class="row">
		<nav class="span4 sidebar-toc" id="sidebar" ::cond currentPage.customData.tag==null::>
			<h3>Table of contents</h3>
			<ul class="unstyled">
			::foreach category sitemap::
				<li ::cond !category.isSerie::><a href="::category.outputPath::" ::attr class if(category==currentCategory) "active"::>::category.title::</a>
					<ul class="unstyled" >
					::foreach page category.pages::
						<li ::cond page.visible:: ::attr class if(page==currentPage) "active"::><a href="::page.outputPath::">::page.title::</a>
							<ol ::cond page.category.isSerie && page.category==currentPage.category::>
								::foreach page page.category.pages::
									<li ::cond page.visible && !page.isSerieHome():: ::attr class if(page==currentPage) "active"::><a href="::page.outputPath::">::page.title::</a></li>
								::end::
							</ol>
						</li>
					::end::
					</ul>
				</li>
				<br ::cond !category.isSerie::/>
				::end::
			</ul>
		</nav>
		<nav class="span4 sidebar-tags" id="sidebar" ::cond currentPage.customData.tag!=null::>
			<h3>All tags</h3>
			<ul class="unstyled">
			::foreach tag getSortedTags()::
				<li ::attr class if(tag==currentPage.customData.tag) "active"::><i class="fa fa-tag"></i> <a href="tag/::tag::.html"><span>::getTagTitle(tag)::</span></a> <small class="category-count">(::tags.get(tag).length::)</small></li>
			::end::
			</ul>
		</nav>
		
		<article class="span8">
			<div itemprop="articleBody">::raw pageContent::</div>
		</article>
</section>
</main>
::end::