From d5329298b2a7084950a9d760e31a9d992c83091b Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Wed, 27 Feb 2013 09:48:51 +0100 Subject: [PATCH] [-] BO : fixed bug #PSCFV-7871 - bad breadcrumb when create a new CMS --- controllers/admin/AdminCmsController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminCmsController.php b/controllers/admin/AdminCmsController.php index 96ac8afd2..a3998cc27 100644 --- a/controllers/admin/AdminCmsController.php +++ b/controllers/admin/AdminCmsController.php @@ -68,7 +68,7 @@ class AdminCmsControllerCore extends AdminController public function renderForm() { - $this->display = 'edit'; + $this->toolbar_btn['save-and-preview'] = array( 'href' => '#', 'desc' => $this->l('Save and preview') @@ -81,7 +81,12 @@ class AdminCmsControllerCore extends AdminController $this->initToolbar(); if (!$this->loadObject(true)) return; - + + if (Validate::isLoadedObject($this->object)) + $this->display = 'edit'; + else + $this->display = 'add'; + $categories = CMSCategory::getCategories($this->context->language->id, false); $html_categories = CMSCategory::recurseCMSCategory($categories, $categories[0][1], 1, $this->getFieldValue($this->object, 'id_cms_category'), 1);