Jump to content

What phrases should I google to find a way to have an extended menu with a tree structure?


Tomi14

Recommended Posts

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

menu.png

Link to comment
Share on other sites

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.

  • Thanks 1
Link to comment
Share on other sites

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

dodatkowo.png

Edited by Tomi14 (see edit history)
Link to comment
Share on other sites

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>

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...