Jump to content

New module in BO header


cikcak

Recommended Posts

Hello, Is it possible to hook module in BO header?

 

I create a new hook in:FrontController , ps_hook table, and add this hook in admin/theme/default/template/header.tpl  {$HOOK_KALBOS}

 

This is module install:

 

public function install()
{
return parent::install() && $this->registerHook('displayNav') &&  $this->registerHook('displayKalbos') 
&& $this->registerHook('displayBackOfficeHeader') && $this->registerHook('displayHeader');
}
 
Return .tpl file in this place:
 
public function hookDisplayKalbos($params)
{
return $this->display(__FILE__, 'bolang.tpl');
}
 
But I can`t see anything in BO header. I should see data from bolang.tpl. Any ideas?
 
I would like to create a block with languages to change it fast. Now I can only go to employee settings and change it.

 

Link to comment
Share on other sites

You don't need to create a new hook to display something in BO header.

 

Just use displayBackOfficeHeader hook, already existing.

 

So in your module call tpl file from hookDisplayBackOfficeHeader function:

 

public function hookDisplayBackOfficeHeader($params)
{
   return $this->display(__FILE__, 'bolang.tpl');
}

Also make sure it is positioned in the hook, or uninstall and install again the module (I see that you already have $this->registerHook('displayBackOfficeHeader') in install function).

Edited by cristic (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...