Jump to content

Display top menu without HOOK_TOP


Recommended Posts

 Hi
I'm looking for a solution to display search and top links in one div, and top menu in another.
Now there is 



<div id="header" class="grid_9 alpha omega">
<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">
<img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if}/>
</a>
{$HOOK_TOP}
</div>

Which generates it all after a logo (short HTML for preview, default theme):
 



<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl">
<head>
<body class=" " id="index">
<div class="container_9 clearfix" id="page">
<::before>
<div class="grid_9 alpha omega" id="header">
 <a href="http://www.pro.shop.pl/prestashop/" id="header_logo" title="ProShop">
 <ul id="header_links">
 <div id="search_block_top">
 <script type="text/javascript">
 <div class="sf-contener clearfix">
 <div class="sf-right">
</div>
<div class="grid_9 alpha omega clearfix" id="columns">
<div class="grid_9 alpha omega clearfix" id="footer">
<::after>
</div>
</body>
</html>

but I want to control this and display only search and links here. The top menu goes to another div (#columns) - this can't be done with HOOK_TOP. I can't find anything in documentation either.

Is there a way to do this in Prestashop? (1.5.5.0)

Link to comment
Share on other sites

in this case you will have to modify the code of this module, and the code in header.tpl file

 

what to do? just close top divs in top horizontal menu module .tpl file and open #columns div there.

 

remove closing div tags in header.tpl and remove also #columns div init

Link to comment
Share on other sites

  • 7 months later...

Hi Vekia

 

Can you please re explain a bit further, I'm afraid I can't get you

I've copy / paste this code into my header.tpl file but the menu does not display

 

    <div id="block_top_menu" class="sf-contener clearfix col-lg-12">
        <ul class="sf-menu clearfix menu-content">test
            {$MENU}
        </ul>
    </div>

 

by the way, i'm with PS 1.6

thxs for your help

Link to comment
Share on other sites

ok i keep on replying my own post but I found the solution, so for those who like me need to display blocks indepedently just

- in the back office, hook the module to a hook (ex displayTop)

- then in the tpl file, just put {hook h='displayTop' mod='name-of-the-block-you want-to-display'}

 

much more easy to customize your theme

cheers

Link to comment
Share on other sites

  • 11 months 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...