// Change display_header and display_footer behavior on BackOffice
This commit is contained in:
@@ -816,7 +816,7 @@ class AdminControllerCore extends Controller
|
|||||||
$this->context->smarty->assign('display_header', $this->display_header);
|
$this->context->smarty->assign('display_header', $this->display_header);
|
||||||
$this->context->smarty->assign('display_footer', $this->display_footer);
|
$this->context->smarty->assign('display_footer', $this->display_footer);
|
||||||
$this->context->smarty->assign('meta_title', $this->meta_title);
|
$this->context->smarty->assign('meta_title', $this->meta_title);
|
||||||
|
|
||||||
// Template override
|
// Template override
|
||||||
$tpl = $this->tpl_folder.'content.tpl';
|
$tpl = $this->tpl_folder.'content.tpl';
|
||||||
$tpl_action = $this->tpl_folder.$this->display.'.tpl';
|
$tpl_action = $this->tpl_folder.$this->display.'.tpl';
|
||||||
@@ -832,7 +832,6 @@ class AdminControllerCore extends Controller
|
|||||||
$page = $this->context->smarty->fetch($tpl);
|
$page = $this->context->smarty->fetch($tpl);
|
||||||
else
|
else
|
||||||
$page = $this->context->smarty->fetch($this->template);
|
$page = $this->context->smarty->fetch($this->template);
|
||||||
|
|
||||||
if ($this->content_only)
|
if ($this->content_only)
|
||||||
echo $page;
|
echo $page;
|
||||||
else
|
else
|
||||||
@@ -1070,12 +1069,11 @@ class AdminControllerCore extends Controller
|
|||||||
return;
|
return;
|
||||||
$this->content .= $this->initForm();
|
$this->content .= $this->initForm();
|
||||||
}
|
}
|
||||||
else if ($this->display != 'view')
|
elseif ($this->display != 'view' && !$this->ajax)
|
||||||
{
|
{
|
||||||
$this->content .= $this->initList();
|
$this->content .= $this->initList();
|
||||||
$this->content .= $this->initOptions();
|
$this->content .= $this->initOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'table' => $this->table,
|
'table' => $this->table,
|
||||||
'current' => self::$currentIndex,
|
'current' => self::$currentIndex,
|
||||||
|
|||||||
+11
-3
@@ -122,10 +122,18 @@ abstract class ControllerCore
|
|||||||
{
|
{
|
||||||
$this->init();
|
$this->init();
|
||||||
|
|
||||||
if ($this->checkAccess())
|
// postProcess handles ajaxProcess
|
||||||
|
$this->postProcess();
|
||||||
|
|
||||||
|
if ($this->display_header || (isset($this->className) && $this->className))
|
||||||
{
|
{
|
||||||
if ($this->ajax && method_exists($this, 'ajaxPreprocess'))
|
$this->setMedia();
|
||||||
$this->ajaxPreProcess();
|
$this->initHeader();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->initContent();
|
||||||
|
if ($this->display_footer || (isset($this->className) && $this->className))
|
||||||
|
$this->initFooter();
|
||||||
|
|
||||||
// postProcess handles ajaxProcess
|
// postProcess handles ajaxProcess
|
||||||
$this->postProcess();
|
$this->postProcess();
|
||||||
|
|||||||
Reference in New Issue
Block a user