// Add category name to page header title

This commit is contained in:
Jerome Nadaud
2013-11-12 10:45:17 +01:00
parent 2a982e96f1
commit 44d1ed0982
@@ -160,16 +160,25 @@ class AdminCategoriesControllerCore extends AdminController
public function initPageHeaderToolbar()
{
if (empty($this->display))
{
parent::initPageHeaderToolbar();
if ($this->display != 'add')
$this->page_header_toolbar_btn['new_category'] = array(
'href' => self::$currentIndex.'&addcategory&token='.$this->token,
'desc' => $this->l('Add new category'),
'icon' => 'process-icon-new'
);
}
parent::initPageHeaderToolbar();
if ($this->display == 'view')
{
array_pop($this->toolbar_title);
$obj = $this->loadObject();
if (Validate::isLoadedObject($obj))
$this->toolbar_title[] = $obj->name[$this->context->employee->id_lang];
$this->page_header_toolbar_title = implode(' '.Configuration::get('PS_NAVIGATION_PIPE').' ', $this->toolbar_title);
}
}
public function initContent()