Tomi14 Posted April 2, 2022 Share Posted April 2, 2022 Im very newbie in Presta, so I rather need to find a complete solution what to change in custom.css and ps_categorytree.tpl I do not have high expectations, anything more readable is enough for me. Please check a attachment Link to comment Share on other sites More sharing options...
Ress Posted April 2, 2022 Share Posted April 2, 2022 Basically, if you know html and css, it's pretty easy to do. In ps_categorytree.tpl you should search for and delete the "collapse" class, this class hides the content, after which you have to delete the html for the "+" and "-" buttons, the ones that display and hide the content, because you will not he still needed them. 1 Link to comment Share on other sites More sharing options...
Tomi14 Posted April 3, 2022 Author Share Posted April 3, 2022 (edited) Thank you very much! Now everything is colaped like I want But second question is, how to get special char "ˬ" after main category , and "-" before all subcategories? Im not so familiar with css too :< When I put for example "content: "\00BB" in .left-sidebar and refresh cache and reload page - nothing happen Edited April 3, 2022 by Tomi14 (see edit history) Link to comment Share on other sites More sharing options...
Ress Posted April 3, 2022 Share Posted April 3, 2022 Something like that. The condition for "depth" is important, if it is 0, it means it is the main category. <li data-depth="{$depth}"> {if $depth===0} <a href="{$node.link}">{$node.name} ///here you put "v"///</a> {if $node.children} <div class="" id="exCollapsingNavbar{$node.id}"> {categories nodes=$node.children depth=$depth+1} </div> {/if} {else} <a class="category-sub-link" href="{$node.link}">///here you put "-"/// {$node.name}</a> {if $node.children} <div class="" id="exCollapsingNavbar{$node.id}"> {categories nodes=$node.children depth=$depth+1} </div> {/if} {/if} </li> 1 1 Link to comment Share on other sites More sharing options...
Tomi14 Posted April 3, 2022 Author Share Posted April 3, 2022 Wow. Thank you very much. Last question - not related to the topic. If I have 5 links in the top menu, 4 of them are to the categories and the last one is to the "service" page, is it possible to get last link in a different color? I don't use any modules for the category, just the one built into prestashop 1 Link to comment Share on other sites More sharing options...
Ress Posted April 3, 2022 Share Posted April 3, 2022 You can with css. Find out how to use the last child property. https://www.w3schools.com/cssref/sel_last-child.asp 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