1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-24 15:13:04 +02:00

Experimental - Support for theme html templates and layouts.

This commit is contained in:
Cameron
2019-06-11 15:53:08 -07:00
parent 43350f5c5c
commit 36b4c354eb
4 changed files with 58 additions and 72 deletions

View File

@@ -227,7 +227,7 @@ if (is_array($pref['e_meta_list']))
if(is_readable($fname))
{
$ret = ($e107_debug || isset($_E107['debug'])) ? include_once($fname) : @include_once($fname);
$ret = (!empty($e107_debug) || isset($_E107['debug'])) ? include_once($fname) : @include_once($fname);
}
}
// content will be added later
@@ -621,7 +621,18 @@ echo "</head>\n";
// ---------- New in 2.0 -------------------------------------------------------
if(isset($LAYOUT) && is_array($LAYOUT)) // $LAYOUT is a combined $HEADER,$FOOTER.
$def = THEME_LAYOUT; // The active layout based on custompage matches.
// v2.2.2 --- Experimental --
if($tmp = e_theme::loadLayout(THEME_LAYOUT))
{
$LAYOUT = $tmp;
unset($tmp);
}
if(isset($LAYOUT) && is_array($LAYOUT)) // $LAYOUT is a combined $HEADER,$FOOTER.
{
foreach($LAYOUT as $key=>$template)
{
@@ -645,7 +656,6 @@ echo "</head>\n";
}
$def = THEME_LAYOUT; // The active layout based on custompage matches.
// echo "DEF = ".$def."<br />";