1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-09 16:17:14 +02:00

Menu Manager now also parses $LAYOUT

This commit is contained in:
Cameron
2013-12-25 02:00:46 -08:00
parent 540f60c249
commit 88188baec8

View File

@@ -170,7 +170,18 @@ class e_menuManager {
function menuGrabLayout()
{
global $HEADER,$FOOTER,$CUSTOMHEADER,$CUSTOMFOOTER;
global $HEADER,$FOOTER,$CUSTOMHEADER,$CUSTOMFOOTER,$LAYOUT;
if(isset($LAYOUT) && is_array($LAYOUT)) // $LAYOUT is a combined $HEADER,$FOOTER.
{
foreach($LAYOUT as $key=>$template)
{
list($hd,$ft) = explode("{---}",$template);
$HEADER[$key] = $hd;
$FOOTER[$key] = $ft;
}
unset($hd,$ft);
}
if(($this->curLayout == 'legacyCustom' || $this->curLayout=='legacyDefault') && (isset($CUSTOMHEADER) || isset($CUSTOMFOOTER)) ) // 0.6 themes.
{
@@ -189,10 +200,8 @@ class e_menuManager {
elseif($this->curLayout && is_array($HEADER) && isset($HEADER[$this->curLayout]) && isset($FOOTER[$this->curLayout])) // 0.8 themes - we use only $HEADER and $FOOTER arrays.
{
// echo " MODE 0.8 ".$this->curLayout;
$HEADER = $HEADER[$this->curLayout];
$FOOTER = $FOOTER[$this->curLayout];
}
// Almost the same code as found in templates/header_default.php ---------