 <?php
 $this->render( '_init.phtml' );
$layout = $this->layout()->getLayout();
$this->tplClass = $layout;

// Setup Nav 
 $mainNav = $this->navigation()->findOneBy('ref','content_root');
 $utilsNav = $this->navigation()->findOneBy('ref','utils_root');

// Setup Cols 

 $contentWCol = 8;
 $nbCol = 2;
 $leftCol = trim($this->placeholder('leftCol'));
 if( empty( $leftCol )) {
 	if($layout=='default'){
  		$leftCol = $this->stories()->render();

 	}else{
	 	$nbCol=1;
	 	$leftCol = false;
	 	$contentWCol = 12;
 		
 	}
 }

 ?>
 <?= $this->doctype(); ?>
 <?= $this->render('_head.phtml'); ?>
 <body>

 	<header class="main">
 		<?= $this->render('_navBar.phtml') ?>


 	</header>
 	<?php if( $layout!='home') : ?>
	<div class="container bread">
		<?= $this->navigation()->breadcrumbs()->setRenderInvisible(true)->setSeparator(' &gt; ')->setPartial('_breadcrumbs.phtml'); ?>
	</div>
	<?php endif; ?>
 	<div id="content-wrapper" class="container">
 		<div class="row">
 			
 		<?php if($leftCol): ?>
 			<aside id="leftCol" class="leftCol col-md-4"><?= $leftCol ?></aside>
 		<?php endif; // leftCol ?>
		 	<section id="contentCol"  class="contentCol <?= 'col-md-'.$contentWCol ?>">
		 		<?php
		 		echo $this->messenger().PHP_EOL;
		 		echo $this->layout()->content;
		 		?>
		 	</section>
 		</div>
	</div>

<?= $this->render('_footer.phtml') ?>
</body>
<?= $this->render( '_foot.phtml' ); ?>
</html>