Example #1
0
<?php

$pageData = array();
$pageName = System::getCurrentPage();
$pageName = $pageName == '' ? 'home' : $pageName;
if ($matches = Uri::match('^(\\w+)\\/?')) {
    $pageName = $matches[1];
}
if ($matches = Uri::match('^page\\/(\\d+)')) {
    $pageName = 'home';
}
// Theme::view('head');
$codeHead = Plugins::load('site_header');
$codeHead = is_array($codeHead) ? '' : $codeHead;
$codeFooter = Plugins::load('site_footer');
$codeFooter = is_array($codeFooter) ? '' : $codeFooter;
// print_r($codeHead);die();
System::defineGlobalVar('site_header', $codeHead);
System::defineGlobalVar('site_footer', $codeFooter);
$links = Links::get(array('cacheTime' => 3, 'orderby' => 'order by sort_order asc'));
System::defineVar('linkList', $links, 'head');
Controller::loadWithPath('theme' . ucfirst($pageName), 'index', System::getThemePath() . 'controller/');
// Theme::view('footer');
Example #2
0
 public static function controller($pageName, $func = 'index', $otherPath = '')
 {
     $themePath = System::getThemePath() . 'controller/';
     if (isset($otherPath[1])) {
         $themePath = $otherPath;
     }
     Controller::loadWithPath('theme' . ucfirst($pageName), $func, $themePath);
 }