Location: PHPKode > projects > Forward > fwdcommerce-0.1/app/templates/alpha/pages.html
{extend "session"}

{args $entry_slug $preview}

{* Get page by entry slug *}
{$page = get("/entries/{$entry_slug|urlencode}", [
	channel => "pages",
	status => "published"
])}

{* Page not found? *}
{if !$page}
	{render "404"}
{/if}

{* Preview entry flag? *}
{if $preview == "preview"}
	{$page = $page.preview}
{/if}

{* Page properties for layout *}
{$request.page_title = $page.page_title|default:$page.title}
{$request.page_description = $page.page_description|default:$page.content|markdown|strip_tags|strip|truncate:200}
{$request.page_keywords = $page.page_keywords}

<div class="content-page">
	<div class="row">
		<div class="span8">
			<h1 class="content-page-header">
				{$page.title}
				{if $preview}<small>Preview</small>{/if}
			</h1>
			<article class="content-page-content">
				{* Content with markdown *}
				{$page.content|markdown}
			</article>
		</div>
		<div class="content-page-sidebar span3 offset1">
			<h4>More</h4>
			<ul class="content-page-menu">
				{foreach get("/channels/pages/entries") as $page}
					<li><a href="/pages/{$page.slug}">{$page.title}</a></li>
				{/foreach}
			</ul>
		</div>
	</div>
</div>
Return current item: Forward