Jump to content

hook blocktopmenu to displaynav, wrong css


Recommended Posts

When i hook the blocktopmenu to displaynav the blocktopmenu is no longer styled by

superfish-modified.css instead its styled by global.css.

 

Anyone know why this is happening? Is this a bug or am i missing something?

(v.1.6)

post-790290-0-57797400-1399963495_thumb.jpg

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

okay

 

i wrote guide for that:

step by step guide with detailed descriptions and pictures:

how to move block top menu module to top section

 

open module file: blocktopmenu.php

add there function code:

 public function hookHeader($params){
        $this->context->controller->addJS($this->_path.'js/hoverIntent.js');
	$this->context->controller->addJS($this->_path.'js/superfish-modified.js');
	$this->context->controller->addJS($this->_path.'js/blocktopmenu.js');
	$this->context->controller->addCSS($this->_path.'css/blocktopmenu.css');
	$this->context->controller->addCSS($this->_path.'css/superfish-modified.css');
}

then go to modules > positions

and transplant blockTopMenu module to displayHeader hook

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Hello.

 

 
I may be doing something wrong. I followed all the tutorial instructions, step by step, twice. I can hook the menu on displayNav... but it loses all javascript's operation. 
Hover effect doesn't work, neither the hyperlinks..
 
This is my store. ver 1.606
 
 
What could be missing?
 
Edit:. I forgot to mention. The hookdisplayHeader is on blocktopmenu.php. Just Bellow hookDisplayNav function.
Best regards
Edited by hgarcia (see edit history)
Link to comment
Share on other sites

strange i can't open your website due to this:

 

 

Sorry. Geolocation settings.

It's open now for U.S. and Europe.

 

At this moment, I have the menu hooked on : 
displayHeader
actionCategoryUpdate
displayNav
displayTop -- only because i need to keep working on the store.
 
When I navigate to a tab from displayTop, I can see the same tab shaded on Nav bar . 
I'm thinking that maybe there is a div or something over the menu, that it's blocking it. 
 
Many thanks. 
And the best regards.
Link to comment
Share on other sites

you also added code to associate javascripts with hookheader ?

Yes. i did. 

I found a solution!! I was posting it when your reply came in.

 

First of all Emma, my apologizes for hijacking your post.

here are my results:

 

All the steps on  your tutorial

 

plus: 

 

On   /modules/blocktopmenu/blocktopmenu.php



public function hookDisplayNav($params)
            {
                    return $this->hookDisplayTop($params);
                    $this->context->controller->addJS($this->_path.'js/hoverIntent.js');
                    $this->context->controller->addJS($this->_path.'js/superfish-modified.js');
                    $this->context->controller->addJS($this->_path.'js/blocktopmenu.js');
                    $this->context->controller->addCSS($this->_path.'css/blocktopmenu.css');
                    $this->context->controller->addCSS($this->_path.'css/superfish-modified.css');
                    
            }


            public function hookdisplayHeader($params){
                    
                    $this->context->controller->addJS($this->_path.'js/hoverIntent.js');
                    $this->context->controller->addJS($this->_path.'js/superfish-modified.js');
                    $this->context->controller->addJS($this->_path.'js/blocktopmenu.js');
                    $this->context->controller->addCSS($this->_path.'css/blocktopmenu.css');
                    $this->context->controller->addCSS($this->_path.'css/superfish-modified.css');

                    
                    }

On     /themes/default-bootstrap/css/modules/blocktopmenu/css/blocktopmenu.css

#block_top_menu {
      padding-top: 1px;/*25px;*/
      padding-bottom: 1px;
      padding-left: 0px;
      z-index: 28895;
    }

With that code, I also moved the block top menu to the left.

 

Now, Block Top Menu is hooked on 

 

     displayHeader
    actionCategoryUpdate
    displayNav
 
 
Many thanks!!!
Link to comment
Share on other sites

×
×
  • Create New...