31 lines
761 B
PHP
31 lines
761 B
PHP
|
<?php
|
||
|
|
||
|
require_once _MODULE_DIR_.'cmsps/classes/CmsPsCategory.php';
|
||
|
|
||
|
class CategoryCmsControllerCore extends FrontController
|
||
|
{
|
||
|
public $php_self = 'categorycms';
|
||
|
public $id_category_cms;
|
||
|
|
||
|
public function canonicalRedirection($canonical_url = '') {
|
||
|
parent::canonicalRedirection($this->context->link->getCategoryCmsLink($this->id_category_cms));
|
||
|
}
|
||
|
|
||
|
public function init() {
|
||
|
$this->id_category_cms = Tools::getValue('id_category_cms', 0);
|
||
|
parent::init();
|
||
|
}
|
||
|
|
||
|
public function initContent() {
|
||
|
parent::initContent();
|
||
|
|
||
|
$categorycms = new CmsPsCategory($this->id_category_cms, $this->context->language->id);
|
||
|
|
||
|
$this->context->smarty->assign(array(
|
||
|
'categorycms' => $categorycms,
|
||
|
));
|
||
|
|
||
|
$this->setTemplate(_PS_THEME_DIR_.'categorycms.tpl');
|
||
|
}
|
||
|
|
||
|
}
|