{strip}
{* used for page specific data or logic in Edit Content -> Logic *}
{process_pagedata}

{* ================
   THEME LOGIC
   ================ *}
    
{* With cms_lang_info we retrieve current language information, assign gives us $nls variable we can work with *}
{cms_lang_info assign='nls'}
{* assigned url to theme related folder so we do not have to type full path each time *}
{$theme_path = "{uploads_url}/simplex"}
{* assigned content tag, now we have all smarty variables available anywhere in template *}
{* assigned title tag to a variable which we can override with a module entry title for example *}
{title assign='main_title'}
{content assign='main_content'}
{* assigned prev and next links so we don't have empty html tags if there is no previous or next page *}
{cms_selflink dir='previous' assign='prev_page'}
{cms_selflink dir='next' assign='next_page'}

{* ensure that the smarty variables we created are copied to global scope for use elsewhere in the template *}
{share_data scope=parent vars='nls,theme_path,main_title,main_content,prev_page,next_page' scope=global}

{* using strip as we don't want useless whitespace, especially not before doctype *}
{/strip}<!doctype html>
<!--[if IE 8]>         <html lang='{$nls->htmlarea()}' dir='{$nls->direction()}' class='lt-ie9'> <![endif]-->
<!--[if gt IE 8]><!--> <html lang='{$nls->htmlarea()}' dir='{$nls->direction()}'> <!--<![endif]-->
    <head>
        <meta charset='{$nls->encoding()}' />
        {metadata} {* Don't remove this! Metadata is entered in Site Admin/Global settings. *}
        <title>{$main_title nocache} - {sitename}</title>
        <meta name='HandheldFriendly' content='True' />
        <meta name='MobileOptimized' content='320' />
        <meta name='viewport' content='width=device-width, initial-scale=1' />
        <meta http-equiv='cleartype' content='on' />
        <meta name='msapplication-TileImage' content='{$theme_path}/images/icons/cmsms-152x152.png' />
        <meta name='msapplication-TileColor' content='#5C5A59' />
        {if isset($canonical)}<link rel='canonical' href='{$canonical}' />{elseif isset($content_obj)}<link rel='canonical' href='{$content_obj->GetURL()}' />{/if} {* See in news detail template how cannonical url can be assigned from module *}
        {cms_stylesheet} {* This is how all the stylesheets attached to this template are linked to *}
        <link href='//fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic|Oswald:700' rel='stylesheet' type='text/css' />
        <link rel='apple-touch-icon-precomposed' sizes='152x152' href='{$theme_path}/images/icons/cmsms-152x152.png' />
        <link rel='apple-touch-icon-precomposed' sizes='120x120' href='{$theme_path}/images/icons/cmsms-120x120.png' />
        <link rel='apple-touch-icon-precomposed' sizes='72x72' href='{$theme_path}/images/icons/cmsms-76x76.png' />
        <link rel='apple-touch-icon-precomposed' href='{$theme_path}/images/icons/cmsms-60x60.png' />
        <link rel='shortcut icon' sizes='196x196' href='{$theme_path}/images/icons/cmsms-196x196.png' />
        <link rel='shortcut icon' href='{$theme_path}/images/icons/cmsms-60x60.png' />
        <link rel='icon' href='{$theme_path}/images/icons/favicon_cms.ico' type='image/x-icon' />
        {cms_selflink dir='start' rellink='1'} {* Relational links for interconnections between pages, good for accessibility and Search Engine Optmization *}
        {cms_selflink dir='prev' rellink='1'}
        {cms_selflink dir='next' rellink='1'}
        <!--[if lt IE 9]>
            <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
            <script src="//css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
        <![endif]-->
    </head>
    <body id='boxed' class='container page-wrapper page-{$page_alias} page-{$content_id}'>
        <!-- #wrapper (wrapping content in a box) -->
        <div class='row' id='wrapper'>
            <!-- accessibility links, jump to nav or content -->
            <ul class="visuallyhidden">
                <li>{anchor anchor='nav' title='Skip to navigation' accesskey='n' text='Skip to navigation'}</li>
                <li>{anchor anchor='main' title='Skip to content' accesskey='s' text='Skip to content'}</li>
            </ul>
            <!-- accessibility //-->
            <!-- .top (top section of page containing logo, navigation search...) -->
            <header class='top inner-section'>
                <div class='row header'>
                    <!-- .logo (cmsms logo on the left side) -->
                    <div class='logo four-col'>
                        <a href='{root_url}' title='{sitename}'>
                            <img src='{$theme_path}/images/cmsmadesimple-logo.png' width='227' height='59' alt='{sitename}' />
                            <span class='palm'></span>
                        </a>
                    </div>
                    <!-- .logo //-->
                    <!-- .main-navigation (main navigation on the right side) -->
                    <nav class='main-navigation eight-col cf noprint' id='nav' role='navigation'>
                        {Navigator loadprops='0' template='Simplex Main Navigation'} {* A Navigator module, database Template *}
                    </nav>
                    <!-- .main-navigation //-->
                </div>
                <!-- .header-bottom (bottom part of header containing catchphrase and search field) -->
                <div class='row header-bottom'>
                    <section class='phrase cf'>
                        <span class='seven-col phrase-text'>Power for professionals<br class='lt-768' /> Simplicity for End Users</span>
                        {Search|strip formtemplate='Simplex Search'} {* Search module using custom template in Design Manager, you should use resultpage parameter for search results (see module help) *}
                    </section>
                </div>
                <!-- .header-bottom //-->
                <!-- .banner (banner area for a slider or teaser image) -->
                {global_content name='Simplex Slideshow'}
                <!-- .banner //-->
            </header>
            <!-- .top //-->
            <!-- .content-wrapper (wrapping div for content area) -->
            <main role='main' class='content-wrapper inner-section'>
                <div class='row'>
                    <!-- .content-inner (display content first) -->
                    <div class='content-inner eight-col push-four'>
                        <!-- .content-top (breadcrumbs) -->
                        <div class='content-top cf' itemscope itemtype='http://data-vocabulary.org/Breadcrumb'>
                            {Navigator action='breadcrumbs'} {* you can create own breadcrumbs template as well and include it with template parameter *}
                            <span class='title-border' aria-hidden='true'></span>
                        </div>
                        <!-- .content-top //-->
                        <!-- .content (actual content with title and content tags) -->
                        <article class='content' id='main'>
                            <h1>{$main_title nocache} </h1> {* title tag *}
                                {$main_content nocache} {* content entered in page editor area, variable is assigned on top in template logic, using nocache as variables are cached with Smarty cache on *}
                        </article>
                        <!-- .content //-->
                    </div>
                    <!-- .content-inner //-->
                    <!-- .sidebar (then show sidebar) -->
                    <aside class='sidebar four-col pull-eight'>
                        {* sample of using News Module tag for summary of latest two articles, remember if News page is deleted you should change detailpage parameter *}
                        {News summarytemplate='Simplex News Summary' number='2' detailtemplate='Simplex News Detail'}
                    </aside>
                    <!-- .sidebar //-->
                    <div class='cf eight-col push-four'>
                        {if !empty($prev_page)}<span class='previous'>{$prev_page nocache}</span>{/if}
                        {if !empty($next_page)}<span class='next'>{$next_page nocache}</span>{/if}
                    </div>
                </div>
            </main>
            <!-- .content-wrapper //-->
            <!-- .footer (footer area) -->
            <footer class='footer inner-section'>
                <span class='back-top'><a href='{anchor anchor='main' onlyhref='1'}' id='scroll-top'><i class='icon-arrow-up' aria-hidden='true'></i></a></span>
                <div class='row'>
                    <section class='eight-col push-four noprint'>
                        <nav class='footer-navigation row'>
                            {Navigator template='Simplex Footer Navigation' excludeprefix='home' number_of_levels='2' loadprops='0'}
                        </nav>
                    </section> 
                    <section class='four-col pull-eight copyright'>
                        {global_content|strip name='Simplex Footer'} {* generic Design Manager template *}
                    </section>
                </div>
            </footer>
        <!-- #wrapper //--> 
        </div>
    {cms_jquery exclude='ui,nestedSortable,json,migrate' append='uploads/simplex/js/jquery.sequence-min.js,uploads/simplex/js/functions.min.js'}{strip}
    {* if you are using some older jQuery plugin that relies on deprecated and removed functions that are no longer supported
       in jQuery 1.11.0 try removing "migrate" from exclude list which will include jQuery Migrate 1.2.1 Plugin.
       For more information about removed functions see: http://jquery.com/upgrade-guide/1.9/ *}{/strip}
    </body>
</html>