diff --git a/admin-dev/tabs/AdminTools.php b/admin-dev/tabs/AdminTools.php index 2f01cabda..9b1f78b31 100644 --- a/admin-dev/tabs/AdminTools.php +++ b/admin-dev/tabs/AdminTools.php @@ -27,16 +27,13 @@ class AdminTools extends AdminController { + public $template = 'adminTools.tpl'; public function __construct() { $this->className = 'AdminTools'; parent::__construct(); } - public function display() - { - parent::display(); - $this->context->smarty->display('adminTools.tpl'); - } + } diff --git a/admin-dev/themes/template/adminTools.tpl b/admin-dev/themes/template/adminTools.tpl index 43a1d0987..ea438ce38 100644 --- a/admin-dev/themes/template/adminTools.tpl +++ b/admin-dev/themes/template/adminTools.tpl @@ -24,11 +24,9 @@ * International Registered Trademark & Property of PrestaShop SA *} -{include file='header.tpl'}
{l s='Shop Tools'}

{l s='Several tools are available to manage your shop.'}


{l s='Please choose a tool by selecting a Tools sub-tab above.'}

-{include file='footer.tpl'} \ No newline at end of file diff --git a/classes/AdminController.php b/classes/AdminController.php index 0607b752b..d70513c09 100644 --- a/classes/AdminController.php +++ b/classes/AdminController.php @@ -3,6 +3,11 @@ class AdminController extends Controller { public $path; + public $content; + + public $content_only = false; + public $layout = 'index.tpl'; + /** @var string Associated table name */ public $table; @@ -116,7 +121,14 @@ class AdminController extends Controller public function display() { - + if ($this->content_only) + $this->context->smarty->display($this->template); + else + { + $this->content = $this->context->smarty->fetch($this->template); + $this->context->smarty->assign('content', $this->content); + $this->context->smarty->display($this->layout); + } } /** @@ -267,7 +279,6 @@ class AdminController extends Controller $this->context->smarty->assign('css_files', $this->css_files); $this->context->smarty->assign('js_files', array_unique($this->js_files)); - //$this->context->smarty->display(_PS_ADMIN_DIR_.'/themes/header.tpl'); } /**