// Add category name to page header title
This commit is contained in:
1 parent
2a982e96f1
commit
44d1ed0982
1 file changed
+13
-4
@@ -160,16 +160,25 @@ class AdminCategoriesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
if (empty($this->display))
|
parent::initPageHeaderToolbar();
|
||||||
{
|
|
||||||
|
if ($this->display != 'add')
|
||||||
$this->page_header_toolbar_btn['new_category'] = array(
|
$this->page_header_toolbar_btn['new_category'] = array(
|
||||||
'href' => self::$currentIndex.'&addcategory&token='.$this->token,
|
'href' => self::$currentIndex.'&addcategory&token='.$this->token,
|
||||||
'desc' => $this->l('Add new category'),
|
'desc' => $this->l('Add new category'),
|
||||||
'icon' => 'process-icon-new'
|
'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()
|
public function initContent()
|
||||||
|
|||||||
Reference in new issue
Block a user