// Add category name to page header title
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user