context->link->getPostCmsLink($this->postcms->id)); } public function init() { $id_post_cms = Tools::getValue('id_post_cms', 0); $this->postcms = new CmsPsPost($id_post_cms, $this->context->language->id); if (!Validate::isLoadedObject($this->postcms) || !$this->postcms->active) { header('HTTP/1.1 404 Not Found'); header('Status: 404 Not Found'); } parent::init(); } public function initContent() { parent::initContent(); $article = CmsPsPost::injectsData($this->postcms); $this->context->smarty->assign(array( 'path' => Tools::getPath($this->postcms->id, '', FALSE, 'postcms'), 'post' => $article )); $this->setTemplate(_PS_THEME_DIR_.'postcms.tpl'); } }