Eljaouhari Posted December 26, 2017 Share Posted December 26, 2017 Helo everyone, i'm trying to display the description of the subcategories on the ps_categorytree module (of course not a classic theme). Here's the non-edited code of the module {function name="categories" nodes=[] depth=0} {strip} {if $nodes|count} <ul class="category-sub-menu"> {foreach from=$nodes item=node} <li data-depth="{$depth}"> {if $depth===0} <a href="{$node.link}">{$node.name}</a> {if $node.children} <div class="navbar-toggler collapse-icons" data-toggle="collapse" data-target="#exCollapsingNavbar{$node.id}"> <i class="ion-ios-arrow-right add"></i> <i class="ion-ios-arrow-down remove"></i> </div> <div class="collapse" id="exCollapsingNavbar{$node.id}"> {categories nodes=$node.children depth=$depth+1} </div> {/if} {else} <a class="category-sub-link" href="{$node.link}">{$node.name}</a> {if $node.children} <span class="arrows" data-toggle="collapse" data-target="#exCollapsingNavbar{$node.id}"> <i class="ion-ios-arrow-right"></i> <i class="ion-ios-arrow-down"></i> </span> <div class="collapse" id="exCollapsingNavbar{$node.id}"> {categories nodes=$node.children depth=$depth+1} </div> {/if} {/if} </li> {/foreach} </ul> {/if} {/strip} {/function} <div class="block-categories"> <ul class="category-top-menu"> <li class="cat_header"><a href="{$categories.link nofilter}">{$categories.name}</a></li> <li class="cat_list">{categories nodes=$categories.children}</li> </ul> </div> And I've tried to add this code {if $node.description} <div id="category-description" class="text-muted">{$node.description nofilter}</div> {/if} After this line <a href="{$node.link}">{$node.name}</a> It doesn't work... I've tried to add the code into multiple places but it just doesn't work either. I need your help! Thanks a lot ! Link to comment Share on other sites More sharing options...
NemoPS Posted December 26, 2017 Share Posted December 26, 2017 does it add anything if you type "test"? If so, it's just about finding out the correct variable name. If not, it's about finding the correct spot. Check this before proceeding any further 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now