{* Шаблон боковой колонки *}

    <div class="row">
        <div class="span3">
 {if $category->brands ||  $features}
<div class="block_listing">    
  <div class="block block-layered-nav">        
    <div class="block-title"><strong>
        <span>Фильтр
        </span></strong>
    </div>        
    <div class="block-content">                                                
      <p class="block-subtitle">Подбор товаров
      </p>            
      <dl id="narrow-by-list">
{* Фильтр по брендам *}
{if $category->brands}                                                                        
        <dt>Бренды
        </dt>                    
        <dd>
          <ol>    
            <li>                
            <a href="catalog/{$category->url}" {if !$brand->id}class="selected"{/if}>Все бренды</a>             
            </li>
	{foreach name=brands item=b from=$category->brands}
		<li> 
		<a data-brand="{$b->id}" href="catalog/{$category->url}/{$b->url}" {if $b->id == $brand->id}class="selected"{/if}>{$b->name|escape}</a>
		</li> 
	{/foreach}                
          </ol>
        </dd>
 {/if}
 
 {* Фильтр по свойствам *}
{if $features}
	{foreach $features as $f}                                                                               
        <dt data-feature="{$f->id}">{$f->name}
        </dt>                    
        <dd>
          <ol>              
            <li>                
            <a href="{url params=[$f->id=>null, page=>null]}" {if !$smarty.get.$f@key}class="selected"{/if}>Все</a>             
            </li>
		{foreach $f->options as $o}
				<li>
				<a href="{url params=[$f->id=>$o->value, page=>null]}" {if $smarty.get.$f@key == $o->value}class="selected"{/if}>{$o->value|escape}</a>
				</li>
		{/foreach}                
          </ol>
        </dd>
	{/foreach}        
{/if}         
                                               
      </dl>            
<script type="text/javascript">decorateDataList('narrow-by-list')</script>                    
    </div>    
  </div>
</div>
{/if}

			<!-- Просмотренные товары -->
			{get_browsed_products var=browsed_products limit=20}
			{if $browsed_products}
			
				<h2>Вы смотрели:</h2>
				<ul id="browsed_products">
				{foreach $browsed_products as $browsed_product}
					<li>
					<a href="products/{$browsed_product->url}"><img src="{$browsed_product->image->filename|resize:50:50}" alt="{$browsed_product->name}" title="{$browsed_product->name}"></a>
					</li>
				{/foreach}
				</ul>
			{/if}
			<!-- Просмотренные товары (The End)-->
			
			
			<!-- Меню блога -->
			{* Выбираем в переменную $last_posts последние записи *}
			{get_posts var=last_posts limit=5}
			{if $last_posts}
			<div id="blog_menu">
				<h2>Новое в <a href="blog">блоге</a></h2>
				{foreach $last_posts as $post}
				<ul>
					<li data-post="{$post->id}">{$post->date|date}<br> <a href="blog/{$post->url}">{$post->name|escape}</a></li>
				</ul>
				{/foreach}
			</div>
			{/if}
			<!-- Меню блога  (The End) -->

 {include file='slider_small.tpl'}

</div>
</div>