Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {assign var="show_child" value="false"}
- {if !isset($currentCategoryId)}
- <li {if isset($last) && $last == 'true'}class="last"{/if}>
- <a href="{$node.link}" title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a>
- </li>
- {/if}
- {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}
- {assign var="show_child" value="true"}
- {/if}
- {if $node.children|@count > 0}
- {foreach from=$node.children item=child name=categoryTreeBranch}
- {if isset($currentCategoryId) && ($child.id == $currentCategoryId)}
- {assign var="show_child" value="true"}
- {/if}
- {/foreach}
- {/if}
- {if $show_child == 'true'}
- {if $node.children|@count > 0}
- {foreach from=$node.children item=child name=categoryTreeBranch}
- {if isset($smarty.foreach.categoryTreeBranch) && $smarty.foreach.categoryTreeBranch.last}
- {include file="$branche_tpl_path" node=$child show='true' last='true'}
- {else}
- {include file="$branche_tpl_path" node=$child show='true' last='false'}
- {/if}
- {/foreach}
- {if $child.children|@count > 0}
- {foreach from=$child.children item=child2 name=categoryTreeBranch2}
- {if isset($currentCategoryId) && ($child2.id == $currentCategoryId)}
- {assign var="show_child" value="true"}
- {/if}
- {/foreach}
- {/if}
- {/if}
- {/if}
- {if isset($show)}
- <li {if isset($last) && $last == 'true'}class="last"{/if}>
- <a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a>
- {if $node.children|@count > 0}
- <ul>
- {foreach from=$node.children item=child name=categoryTreeBranch}
- {if isset($smarty.foreach.categoryTreeBranch) && $smarty.foreach.categoryTreeBranch.last}
- {include file="$branche_tpl_path" node=$child show='true' last='true'}
- {else}
- {include file="$branche_tpl_path" node=$child show='true' last='false'}
- {/if}
- {/foreach}
- </ul>
- {/if}
- </li>
- {/if}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement