<?php echo $header; ?>
<?php require( PAVO_THEME_DIR."/template/common/breadcrumb.tpl" );  ?>
<div id="group-content">
<div class="container">
  <?php require( PAVO_THEME_DIR."/template/common/config_layout.tpl" );  ?>
  <div class="row"><?php if( $SPAN[0] ): ?>
			<aside id="sidebar-left" class="col-md-<?php echo $SPAN[0];?>">
				<?php echo $column_left; ?>
			</aside>	
		<?php endif; ?> 
  
   <section id="sidebar-main" class="col-md-<?php echo $SPAN[1];?>">

    <div id="content"><?php echo $content_top; ?>
      <h1><?php echo $heading_title; ?></h1>
      <?php if ($categories) { ?>
      <p><strong><?php echo $text_index; ?></strong>
        <?php foreach ($categories as $category) { ?>
        &nbsp;&nbsp;&nbsp;<a href="index.php?route=product/manufacturer#<?php echo $category['name']; ?>"><?php echo $category['name']; ?></a>
        <?php } ?>
      </p>

      <?php foreach ($categories as $category) { ?>
      <div class="manufacturer-list">
        <div class="manufacturer-heading"><h2 id="<?php echo $category['name']; ?>"><?php echo $category['name']; ?></h2></div>
        <div class="manufacturer-content">
          <?php if ($category['manufacturer']) { ?>
            <?php foreach (array_chunk($category['manufacturer'], 4) as $manufacturers) { ?>
              <div class="row">
                <?php foreach ($manufacturers as $manufacturer) { ?>
                <div class="col-sm-3"><a href="<?php echo $manufacturer['href']; ?>"><?php echo $manufacturer['name']; ?></a></div>
                <?php } ?>
              </div>
            <?php } ?>
          <?php } ?>
        </div>
      </div>
      <?php } ?>

      <?php } else { ?>
      <p><?php echo $text_empty; ?></p>
      <div class="buttons clearfix">
        <div class="pull-right"><a href="<?php echo $continue; ?>" class="button btn"><?php echo $button_continue; ?></a></div>
      </div>
      <?php } ?>
      <?php echo $content_bottom; ?></div>
   </section> 
<?php if( $SPAN[2] ): ?>
	<aside id="sidebar-right">	
		<?php echo $column_right; ?>
	</aside>
<?php endif; ?></div>
</div>
</div>
<?php echo $footer; ?>