Init
This commit is contained in:
43
view/MainView.php
Normal file
43
view/MainView.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?PHP
|
||||
|
||||
/**
|
||||
* Simpla CMS
|
||||
* Storefront class: Каталог товаров
|
||||
*
|
||||
* Этот класс использует шаблоны hits.tpl
|
||||
*
|
||||
* @copyright 2010 Denis Pikusov
|
||||
* @link http://simplacms.ru
|
||||
* @author Denis Pikusov
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
require_once('View.php');
|
||||
|
||||
|
||||
class MainView extends View
|
||||
{
|
||||
|
||||
function fetch()
|
||||
{
|
||||
if ($this->page) {
|
||||
$this->design->assign('meta_title', $this->page->meta_title);
|
||||
$this->design->assign('meta_keywords', $this->page->meta_keywords);
|
||||
$this->design->assign('meta_description', $this->page->meta_description);
|
||||
$this->design->assign('page', $this->page);
|
||||
}
|
||||
|
||||
// Страницы (услуги) на главной
|
||||
$home_services = $this->services->get_home_services(true, true);
|
||||
$this->design->assign('home_services', $home_services);
|
||||
|
||||
//mobile detect class
|
||||
require_once($_SERVER['DOCUMENT_ROOT'] . '/mobiledetect/Mobile_Detect.php');
|
||||
$detect = new Mobile_Detect;
|
||||
$this->design->assign('detect', $detect);
|
||||
|
||||
return $this->design->fetch('main.tpl');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user