Example #1
0
 public function __construct($config = [])
 {
     $this->_Config = $config;
     if ($this->_Config['theme']) {
         $this->_Theme = includeTheme();
     }
 }
Example #2
0
$metak = $data_index->meta;
$metad = $data_index->metad;
$metarNoIndex = $data_index->metarNoIndex;
$metarNoFollow = $data_index->metarNoFollow;
$metarNoArchive = $data_index->metarNoArchive;
$url = $data_index->url;
$content = $data_index->content;
$parent = $data_index->parent;
$template_file = $data_index->template;
$private = $data_index->private;
// after fields from dataindex, can modify globals here or do whatever by checking them
exec_action('index-post-dataindex');
# if page does not exist, throw http response header then output
$errorcode = GSHTTPPREFIX !== '' ? str_replace(GSHTTPPREFIX, '', $url) : $url;
if ($errorcode == GSSLUGNOTFOUND || $errorcode == GSSLUGPRIVATE) {
    header($_SERVER["SERVER_PROTOCOL"] . ' ' . $errorcode);
}
# check for correctly formed url
if (getDef('GSCANONICAL', true)) {
    if ($_SERVER['REQUEST_URI'] != find_url($url, $parent, 'relative')) {
        redirect(find_url($url, $parent));
    }
}
if ($load['template']) {
    # call pretemplate Hook
    exec_action('index-pretemplate');
    // include theme
    includeTheme($TEMPLATE, $template_file);
    # call posttemplate Hook
    exec_action('index-posttemplate');
}