26 lines
698 B
PHP
26 lines
698 B
PHP
<?php
|
|
require_once _PS_MODULE_DIR_.'cmsps/classes/CmsPsEdito.php';
|
|
require_once _PS_MODULE_DIR_.'cmsps/classes/CmsPsPost.php';
|
|
|
|
class IndexController extends IndexControllerCore
|
|
{
|
|
public function initContent()
|
|
{
|
|
$id_lang = Context::getContext()->language->id;
|
|
|
|
$edito = CmsPsEdito::getLast($id_lang);
|
|
$posts = CmsPsPost::getPostHome($id_lang);
|
|
|
|
$this->context->smarty->assign(array(
|
|
'edito' => $edito,
|
|
'posts_home_1' => array_slice($posts, 0, 3),
|
|
'posts_home_2' => array_slice($posts, 3, 4),
|
|
'posts_home_3' => array_slice($posts, 7, 3),
|
|
'posts_home_4' => array_slice($posts, 10, 3),
|
|
'posts_home_5' => array_slice($posts, 11, 1)
|
|
));
|
|
|
|
parent::initContent();
|
|
}
|
|
}
|