From 068b7100c4210a3ff87dc371a753a6b4972362fb Mon Sep 17 00:00:00 2001 From: gRoussac Date: Wed, 27 Nov 2013 16:26:22 +0100 Subject: [PATCH] [*] FO : Merge of https://github.com/PrestaShop/PrestaShop/pull/854 again --- controllers/front/CmsController.php | 4 +++- controllers/front/ManufacturerController.php | 5 +++-- controllers/front/SupplierController.php | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/controllers/front/CmsController.php b/controllers/front/CmsController.php index 2c9793ec4..9a1ef0e8b 100644 --- a/controllers/front/CmsController.php +++ b/controllers/front/CmsController.php @@ -112,7 +112,8 @@ class CmsControllerCore extends FrontController $this->context->smarty->assign(array( 'cms' => $this->cms, 'content_only' => (int)(Tools::getValue('content_only')), - 'path' => $path + 'path' => $path, + 'body_classes' => array($this->php_self.'-'.$this->cms->id, $this->php_self.'-'.$this->cms->link_rewrite) )); if ($this->cms->indexation == 0) @@ -126,6 +127,7 @@ class CmsControllerCore extends FrontController 'sub_category' => $this->cms_category->getSubCategories($this->context->language->id), 'cms_pages' => CMS::getCMSPages($this->context->language->id, (int)($this->cms_category->id), true, (int)$this->context->shop->id), 'path' => ($this->cms_category->id !== 1) ? Tools::getPath($this->cms_category->id, $this->cms_category->name, false, 'CMS') : '', + 'body_classes' => array($this->php_self.'-'.$this->cms_category->id, $this->php_self.'-'.$this->cms_category->link_rewrite) )); } diff --git a/controllers/front/ManufacturerController.php b/controllers/front/ManufacturerController.php index 665ad295a..a1193659e 100644 --- a/controllers/front/ManufacturerController.php +++ b/controllers/front/ManufacturerController.php @@ -106,7 +106,8 @@ class ManufacturerControllerCore extends FrontController 'products' => $products, 'path' => ($this->manufacturer->active ? Tools::safeOutput($this->manufacturer->name) : ''), 'manufacturer' => $this->manufacturer, - 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM') + 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM'), + 'body_classes' => array($this->php_self.'-'.$this->manufacturer->id, $this->php_self.'-'.$this->manufacturer->link_rewrite) )); } @@ -132,7 +133,7 @@ class ManufacturerControllerCore extends FrontController 'nbManufacturers' => $nbProducts, 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), 'manufacturers' => $data, - 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), + 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY') )); } else diff --git a/controllers/front/SupplierController.php b/controllers/front/SupplierController.php index ec31da243..b9fae2e42 100644 --- a/controllers/front/SupplierController.php +++ b/controllers/front/SupplierController.php @@ -108,7 +108,8 @@ class SupplierControllerCore extends FrontController 'products' => $products, 'path' => ($this->supplier->active ? Tools::safeOutput($this->supplier->name) : ''), 'supplier' => $this->supplier, - 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM') + 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM'), + 'body_classes' => array($this->php_self.'-'.$this->supplier->id, $this->php_self.'-'.$this->supplier->link_rewrite) )); }