Example layout

Here is a full example of the sort of tags you can add to your layout files to create a theme, but really the basics come down to adding {$template.title}, {$template.metadata}, {$template.body} and refferences to your themes CSS, JS, any plugins it needs, etc.

All the theme_view() stuff is optional, just as a way to split chunks of HTML out of the main layout into shareable partials.

{literal}<doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$template.title} | {$ci->setting->item('site_name')}</title>
{$template.metadata}
{theme_css('style.css')}
</head>

<body>

{if $ci->settings->item('google_analytic')}
{$ci->load->view('fragments/google_analytic')}
{/if}

<div id="header">
{theme_view('header')}
</div>

<ul id="menu">
{foreach navigation('header') link}
<li>{anchor( $link->url, $link->title, array(target=$link->target))}</li>
{/foreach}
</ul>

<div id="content">

<div id="left-column" class="sidebar">
{widget_area('sidebar')}
</div>

<div id="right-column">
{$template.body}
</div>

</div>
</body>
</html>

« Back to "Designers Guide"


Hosted by CloudIgniter
Click here to lend your support to: pyrocms and make a donation at www.pledgie.com !