Jump to content

Menu items with category picture on background


Lorentztm

Recommended Posts

Hello!
 
I am trying to change my menu so it would have the image of the categories i selected to be part of the top menu on background, as the attached image shows.

 

So i've added to the ps.mainmenu.tpl file, on line 23, the following code (taken from category.tpl, line 33):

<div class="menu-text">{$node.label}</div>
<img class="menu-image" src="{$category.image.large.url}" alt="{$category.image.legend}">

While it looks good, when I change the page i'm on, the image changes as well, showing the image of the current category i'm in. 

 

Question: what can i do so the picture that appears on the background of each menu item is the picture of its own category?

 

 

Btw, great job with Prestashop 1.7, it's way easier to work with.

post-530422-0-74683100-1494008502_thumb.jpg

Link to comment
Share on other sites

  • 3 weeks later...

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...