Ejemplo n.º 1
0
 public function _prepareHook()
 {
     if (file_exists(_PS_THEME_DIR_ . 'css/modules/leoblog/assets/leoblog.css')) {
         $this->context->controller->addCSS($this->_path . 'assets/leoblog.css', 'all');
     } else {
         $this->context->controller->addCSS($this->_path . 'views/css/leoblog.css', 'all');
     }
     $helper = LeoBlogHelper::getInstance();
     $category = new Leoblogcat(Tools::getValue('id_leoblogcat'), $this->context->language->id);
     $tree = $category->getFrontEndTree((int) $category->id_leoblogcat > 1 ? $category->id_leoblogcat : 1, $helper);
     $this->smarty->assign('tree', $tree);
     if ($category->id_leoblogcat) {
         # validate module
         $this->smarty->assign('currentCategory', $category);
     }
     return true;
 }
Ejemplo n.º 2
0
 public function _prepareHook()
 {
     $helper = LeoBlogHelper::getInstance();
     $category = new Leoblogcat(Tools::getValue('id_leoblogcat'), $this->context->language->id);
     $tree = $category->getFrontEndTree((int) $category->id_leoblogcat > 1 ? $category->id_leoblogcat : 1, $helper);
     $this->smarty->assign('tree', $tree);
     if ($category->id_leoblogcat) {
         # validate module
         $this->smarty->assign('currentCategory', $category);
     }
     return true;
 }