public function __construct() { $this->bootstrap = true; $this->table = 'cms'; $this->list_id = 'cms'; $this->className = 'CMS'; $this->lang = true; $this->addRowAction('edit'); $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), 'icon' => 'icon-trash')); $this->fields_list = array('id_cms' => array('title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'link_rewrite' => array('title' => $this->l('URL')), 'meta_title' => array('title' => $this->l('Title'), 'filter_key' => 'b!meta_title'), 'position' => array('title' => $this->l('Position'), 'filter_key' => 'position', 'align' => 'center', 'class' => 'fixed-width-sm', 'position' => 'position'), 'active' => array('title' => $this->l('Displayed'), 'align' => 'center', 'active' => 'status', 'class' => 'fixed-width-sm', 'type' => 'bool', 'orderby' => false)); // The controller can't be call directly // In this case, AdminCmsContentController::getCurrentCMSCategory() is null if (!AdminCmsContentController::getCurrentCMSCategory()) { $this->redirect_after = '?controller=AdminCmsContent&token=' . Tools::getAdminTokenLite('AdminCmsContent'); $this->redirect(); } $this->_category = AdminCmsContentController::getCurrentCMSCategory(); $this->tpl_list_vars['icon'] = 'icon-folder-close'; $this->tpl_list_vars['title'] = sprintf($this->l('Pages in category "%s"'), $this->_category->name[Context::getContext()->employee->id_lang]); $this->_join = ' LEFT JOIN `' . _DB_PREFIX_ . 'cms_category` c ON (c.`id_cms_category` = a.`id_cms_category`)'; $this->_select = 'a.position '; $this->_where = ' AND c.id_cms_category = ' . (int) $this->_category->id; parent::__construct(); }
public function __construct() { $this->bootstrap = true; $this->is_cms = true; $this->table = 'cms_category'; $this->list_id = 'cms_category'; $this->className = 'CMSCategory'; $this->lang = true; $this->addRowAction('view'); $this->addRowAction('edit'); $this->addRowAction('delete'); $this->_orderBy = 'position'; $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), 'icon' => 'icon-trash')); $this->tpl_list_vars['icon'] = 'icon-folder-close'; $this->tpl_list_vars['title'] = $this->l('Categories'); $this->fields_list = array('id_cms_category' => array('title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'name' => array('title' => $this->l('Name'), 'width' => 'auto', 'callback' => 'hideCMSCategoryPosition', 'callback_object' => 'CMSCategory'), 'description' => array('title' => $this->l('Description'), 'maxlength' => 90, 'orderby' => false), 'position' => array('title' => $this->l('Position'), 'filter_key' => 'position', 'align' => 'center', 'class' => 'fixed-width-sm', 'position' => 'position'), 'active' => array('title' => $this->l('Displayed'), 'class' => 'fixed-width-sm', 'active' => 'status', 'align' => 'center', 'type' => 'bool', 'orderby' => false)); // The controller can't be call directly // In this case, AdminCmsContentController::getCurrentCMSCategory() is null if (!AdminCmsContentController::getCurrentCMSCategory()) { $this->redirect_after = '?controller=AdminCmsContent&token=' . Tools::getAdminTokenLite('AdminCmsContent'); $this->redirect(); } $this->cms_category = AdminCmsContentController::getCurrentCMSCategory(); $this->_where = ' AND `id_parent` = ' . (int) $this->cms_category->id; $this->_select = 'position '; parent::__construct(); }
public function __construct() { $this->table = 'cms'; $this->className = 'CMS'; $this->lang = true; $this->addRowAction('edit'); $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); $this->fields_list = array('id_cms' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'link_rewrite' => array('title' => $this->l('URL'), 'width' => 'auto'), 'meta_title' => array('title' => $this->l('Title'), 'width' => '300', 'filter_key' => 'b!meta_title'), 'position' => array('title' => $this->l('Position'), 'width' => 40, 'filter_key' => 'position', 'align' => 'center', 'position' => 'position'), 'active' => array('title' => $this->l('Displayed'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false)); // The controller can't be call directly // In this case, AdminCmsContentController::getCurrentCMSCategory() is null if (!AdminCmsContentController::getCurrentCMSCategory()) { $this->redirect_after = '?controller=AdminCmsContent&token=' . Tools::getAdminTokenLite('AdminCmsContent'); $this->redirect(); } $this->_category = AdminCmsContentController::getCurrentCMSCategory(); $this->_join = ' LEFT JOIN `' . _DB_PREFIX_ . 'cms_category` c ON (c.`id_cms_category` = a.`id_cms_category`)'; $this->_select = 'a.position '; $this->_filter = 'AND c.id_cms_category = ' . (int) $this->_category->id; parent::__construct(); }