toutpratique/controllers/front/VideosController.php

30 lines
614 B
PHP
Raw Normal View History

2015-09-22 10:44:25 +02:00
<?php
2015-10-06 12:51:38 +02:00
require _PS_MODULE_DIR_.'cmsps/cmsps.php';
2015-09-22 10:52:26 +02:00
2015-09-22 10:44:25 +02:00
class VideosControllerCore extends FrontController
{
public $php_self = 'videos';
public function canonicalRedirection($canonical_url = '') {
parent::canonicalRedirection($this->context->link->getVideosLink());
}
public function init() {
parent::init();
}
public function initContent() {
parent::initContent();
$id_lang = Context::getContext()->language->id;
2015-09-22 10:52:26 +02:00
$articles = CmsPsPost::getVideoPost($id_lang, 999);
$this->context->smarty->assign(array(
'articles' => $articles
));
2015-09-22 10:44:25 +02:00
$this->setTemplate(_PS_THEME_DIR_.'videos.tpl');
}
}