-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-loader.php
executable file
·29 lines (24 loc) · 1.04 KB
/
template-loader.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
if (!defined('eGeek')) die('Acceso Prohibido');
//incluimos el archivo principal
include(DirInclude.'/'.$context['include'].'.php');
//leemos el header?
if ($load_header){
$template_header = !empty($context['header_template']) ? $context['header_template'] : 'header';
include(DirContent.'/themes/'. $template_header .'.template.php');
}
//tiene un template antes?
if (!empty($context['template_above'])){
include(DirContent.'/themes/'.$context['template_above'].'.template.php');
}
//template a mostrar
include(DirContent.'/themes/'.$context['template'].'.template.php');
//tiene un template despues?
if (!empty($context['template_below'])){
include(DirContent.'/themes/'.$context['template_below'].'.template.php');
}
//tenemos footer?
if ($load_footer){
$template_footer = !empty($context['footer_template']) ? $context['footer_template'] : 'footer';
include(DirContent.'/themes/'. $template_footer .'.template.php');
}