Jump to content

Multilevel Dropdown Menus In Prestashop


Recommended Posts

  • 2 weeks later...

where do i put this code?

 

<style>
 
#categories_block_left li {
position:relative;
}
 
.wrp{
    display: none;
    left: 91%;
    padding: 5px;
    position: absolute;
    top: -6px;
    width: 100%;
    z-index: 777;
}
 
.wrp .wrp{
    left: 89%;
}
 
#categories_block_left li:hover > .wrp{
display:block;
}
 
#categories_block_left li ul {
background: none repeat scroll 0 0 #FFFFFF;
border: 1px solid #E7E7E7;
}
 
#categories_block_left li ul li a{
padding: 10px 20px !important;
}
 
#categories_block_left li {
-moz-transition: all 1s; -webkit-transition: all 1s; -o-transition: all 1s;
border-bottom: 1px dotted #E7E7E7;
position:relative;
}
#categories_block_left li.last {
border: none;
}
#categories_block_left li a {
   background-image: none;
    display: block;
    padding: 10px 20px 10px 12px;
}
 
#categories_block_left .selected {
background: none repeat scroll 0 0 #EEEEEE;
}
#categories_block_left li:hover {
background: none repeat scroll 0 0 #EEEEEE;
 
}
#categories_block_left li a:hover {
text-decoration:none;
}
 
#categories_block_left li ul {
margin-left: 20px;
}
 
</style>
 
 
and this code, where do i put?
 
 
<script>
  $(document).ready(function(){
 
           $(".wrp").parent().addClass('sub-item');
          $(".selected").parent().addClass('selecte');
 
  });
  </script>
 
 
and this code?
 
<style>
 
.sub-item{
position:relative;
 
}
 
.sub-item:before{
-moz-transition: all 1s; -webkit-transition: all 1s; -o-transition: all 1s;
border-color: #fff #fff  #fff #000000;
    border-image: none;
    border-style: solid;
    border-width: 5px;
    bottom: 35%;
    content: "";
    position: absolute;
    right: 10px;
}
 
.sub-item:hover:before{
 
border-color: #EEEEEE #EEEEEE #EEEEEE #000000;
}
 
.sub-item:hover:before{
border-color: #EEEEEE #EEEEEE #EEEEEE #000000;
}
 
.selecte:before{
-moz-transition: all 1s; -webkit-transition: all 1s; -o-transition: all 1s;
border-color: #EEEEEE #EEEEEE #EEEEEE #000000;
}
 
</style>
Link to comment
Share on other sites

It's not exactly good practice, but they suggest putting it in the same tpl file apparently. They seem not to know prestashop well if they recommend it, it's dirty yet quick, so you can try it out that way, or do it clean by using hookDisplayHeader and creating separate css/js files

Link to comment
Share on other sites

×
×
  • Create New...