garancia/modules/devspeblockcategories/devspeblockcategories.tpl

68 lines
2.3 KiB
Smarty
Raw Normal View History

2016-10-10 15:24:25 +02:00
{if isset($HOOK_MOBILE_HEADER)}
{else}
<!-- Block categories module -->
<div id="categories_block">
<div class="categories_block">
<div class="bg_categories_block">
<div class="produits">
<p class="title uppercase">{l s='Nos gammes et produits' mod='devspeblockcategories'}</p>
{*assign var=compteurFP value=$fullProducts|@count/2*}
<div>
<ul>
{foreach from=$fullProducts item=produit name=fullProducts}
{if $smarty.foreach.fullProducts.index < 6}
<li><a href="{$link->getProductLink($produit.id_product,$produit.link_rewrite)}"{if $idProduct==$produit.id_product} class="selected"{/if}>{$produit.name}</a></li>
{/if}
{/foreach}
</ul>
<ul>
{foreach from=$fullProducts item=produit name=fullProducts}
{if $smarty.foreach.fullProducts.index == 6}
<li><a href="{$link->getProductLink($produit.id_product,$produit.link_rewrite)}"{if $idProduct==$produit.id_product} class="selected"{/if}>{$produit.name}</a></li>
{/if}
{/foreach}
{foreach from=$blockCategTree.children item=child name=blockCategTree}
{if $child.id>=18 && $child.id <= 21}
<li class="item{$compteur++}">
<a href="{$child.link|escape:'htmlall':'UTF-8'}" {if isset($idCategory) && $child.id == $idCategory}class="selected"{/if} title="{$child.desc|escape:'htmlall':'UTF-8'}">{$child.name|escape:'htmlall':'UTF-8'}</a>
</li>
{/if}
{/foreach}
</ul>
</div>
</div>
<div class="besoins uppercase">
<p class="title">{l s='Vos besoins' mod='devspeblockcategories'}</p>
<ul class="tree">
{assign var=compteur value=0}
{foreach from=$blockCategTree.children item=child name=blockCategTree}
{include file="$branche_tpl_path" node=$child compteur=$compteur}
{/foreach}
</ul>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<!-- /Block categories module -->
{literal}
<script type="text/javascript">
$(document).ready(function(){
$('.sf-contener li').each(function(i){
if(i==1){
$(this).addClass('nosProduits');
$(this).find('a').addClass('lien');
}
});
if($('.sf-contener').find('nosProduits')){
$("#categories_block .categories_block").clone().appendTo(".nosProduits");
$("#categories_block").remove();
}else{
console.log('error');
}
});
</script>
{/literal}
{/if}