Jump to content

Moving Top horizontal menu outside displayTop


Recommended Posts

Hi,

I am trying to move the Top Horizontal Menu outside the displayTop hook.

 

I created a custom hook(menuHeader), copied the hookDisplayTop method in the blocktopmenu.php , and changed the name to hookMenuHeader, registered the new hook and then added the hook in the header.tpl as

 

<div id="header_right" class="grid_9 omega">
     <div class="user">
           {$HOOK_TOP}
     </div>
     {hook h='menuHeader'}    
</div>

 

When I restarted the Top Horizontal Menu two Menus appear at the top of the page. And they have the proper style. However the moment I remove the one in displayTop hook the style breaks. I don't understand why this is happening.

post-765655-0-62084100-1395756081_thumb.png

Link to comment
Share on other sites

Hello,

Best way is to use CSS, for this, assign to the menu wrapper selector (div, ul or something else) these properties : "position : relative" and "top : Xpx" .

 

No need to create a new hook!

 

Best 
Xlynx

Link to comment
Share on other sites

The problem comes with the design that our client has choosen. To make it the way they want we need something like this


<div id="header_right" class="grid_9 omega">
      <div class="user">

           Logo, login buttons, cart plugin
      </div>
      Menu here
</div>

instead of the default one
<div id="header_right" class="grid_9 omega">
      Logo, login buttons, cart plugin
      Menu here
</div>

 

The designer in my company told me that this is the best way to achieve the desired style, since it is a responsive theme we have a lot of variables to consider.

Link to comment
Share on other sites

×
×
  • Create New...