rpeermohamed Posted July 14, 2017 Share Posted July 14, 2017 Hello, I want to make block_top_menu width to full size. For a example like "class=nav" My web site: http://houseoflighting.net/ Link to comment Share on other sites More sharing options...
Adeko.nl Posted July 17, 2017 Share Posted July 17, 2017 Hello Rpeermohamed, The easy way is to change the class container to container-fluid in the header.tpl This will make your header (logo, search bar, cart and block top menu) full width. If you only want to make the block top menu full width you should make a new hook that isn't inside a container class. (1) Place this in your header.tpl at the place you want the block top menu to appear: {hook h="myCustomHook"} (2) In Modules > blocktopmenu > blocktopmenu.php extend the install function with this: if (!parent::install() || !$this->registerHook('header') || !$this->registerHook('displayTop') || !$this->registerHook('actionObjectCategoryUpdateAfter') || !$this->registerHook('actionObjectCategoryDeleteAfter') || !$this->registerHook('actionObjectCategoryAddAfter') || !$this->registerHook('actionObjectCmsUpdateAfter') || !$this->registerHook('actionObjectCmsDeleteAfter') || !$this->registerHook('actionObjectCmsAddAfter') || !$this->registerHook('actionObjectSupplierUpdateAfter') || !$this->registerHook('actionObjectSupplierDeleteAfter') || !$this->registerHook('actionObjectSupplierAddAfter') || !$this->registerHook('actionObjectManufacturerUpdateAfter') || !$this->registerHook('actionObjectManufacturerDeleteAfter') || !$this->registerHook('actionObjectManufacturerAddAfter') || !$this->registerHook('actionObjectProductUpdateAfter') || !$this->registerHook('actionObjectProductDeleteAfter') || !$this->registerHook('actionObjectProductAddAfter') || !$this->registerHook('categoryUpdate') || !$this->registerHook('actionShopDataDuplication') || !$this->registerHook('myCustomHook')) { // <-- This is your new hook return false; } (3) Then somewhere near line 745 paste this in blocktopmenu.php: public function hookMyCustomHook($params) { return $this->hookDisplayTop($params); } Now go to the modules page in your backoffice, search for block top menu and reset the module. Unhook it from displayTop, so it won't be shown twice. If you don't see any changes please make sure you have cleared your cache. 1 1 Link to comment Share on other sites More sharing options...
fibo Posted July 17, 2017 Share Posted July 17, 2017 Hi! In your global.css, around the line 5771, you should have this rules: header .row > .container { position: relative; } Change it to: header .row > .container { position: relative; width: 100%; } 1 Link to comment Share on other sites More sharing options...
akps1234 Posted April 4, 2018 Share Posted April 4, 2018 Hi Adeko, Thx a lot for the tip. Works like a charm! I just enclosed the superfish menu inside the extra div to center it. Alex Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now