Jump to content

Move "blockcmsinfo" module under "Top horizontal menù"


Gianluca Trevisan

Recommended Posts

I tried some similar some days ago. It is not that easy. Block CMS does not provide a hook for this position - unfortunately.

I think you would need the Hook DisplayTop.

 

A quick and dirty untested approach:

 

1) Uninstall BlockCMSInfo Module

2) Make a copy of your blockcmsinfo.php first or make a module override into the corresponding folder.

3) Then add a function called within override or at the existing place.

public function hookDisplayTop($params) {
   return hookHome($params);
}

Above code should just add  the new hook by using the existing function from display home.

4) Also change the Install function by adding the additional registerHook line for displaytop.

    public function install()
    {
        return     parent::install() &&
                $this->installDB() &&
                $this->registerHook('home') &&
                $this->registerHook('displaytop') &&
                $this->installFixtures() &&
                $this->disableDevice(Context::DEVICE_TABLET | Context::DEVICE_MOBILE);
    }

5) If you use override, delete the file ../cache/class_index.php - if you don't do that, the override will not take effect.

6) Reinstall the module. Reinstalling makes the new hook available.

7) Check the Modules Hook under -> Modules -> Position. If under wrong positikon, delete the  Hook Home and add Hook DisplayTop.

8) Some CSS changes might be needed.

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

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...