context->link->getHomeEditoLink()); } public function init() { $this->page = Tools::getValue('page', 1); parent::init(); } public function initContent() { parent::initContent(); $id_lang = Context::getContext()->language->id; $total = CmsPsEdito::getAllEditos($id_lang, 9999999, 1, TRUE); $editos = CmsPsEdito::getAllEditos($id_lang, self::PER_PAGE, $this->page, FALSE); $nb_page = ceil($total / self::PER_PAGE); if($this->page > $nb_page) { $this->page = $nb_page; } $url_pagination = strtok($_SERVER['REQUEST_URI'], '?'); $this->context->smarty->assign(array( // 'path' => Tools::getPath($this->postedito->id, '', FALSE, 'postedito'), 'editos' => $editos, 'url_pagination' => $url_pagination, 'nb_page' => $nb_page, 'total' => $total, 'limit' => count($editos), 'p' => $this->page, )); $this->setTemplate(_PS_THEME_DIR_.'editos.tpl'); } }