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

Improved Front page detection, themes now have an option to assign layout to frontpage via spacial keyword FRONTPAGE

This commit is contained in:
secretr
2011-12-02 16:33:31 +00:00
parent 5432fe98c0
commit 1b83f6a5e4
5 changed files with 35 additions and 24 deletions

View File

@@ -91,6 +91,7 @@ class core_index_index_controller extends eController
// Former Welcome Message front-page. Should be handled by current theme layout
elseif($location == 'index.php' || $location == 'url:/' || $location == 'route:/' || $location == '/')
{
define('e_FRONTPAGE', true);
$this->_forward('front');
return;
}
@@ -112,6 +113,7 @@ class core_index_index_controller extends eController
{
throw new eException('Infinite loop detected while dispatching front page.', 2);
}
define('e_FRONTPAGE', true);
$this->_forward($request->getRoute());
return;
}
@@ -132,7 +134,7 @@ class core_index_index_controller extends eController
{
throw new eException('Infinite loop detected while dispatching front page.', 2);
}
define('e_FRONTPAGE', true);
$this->_forward($request->getRoute(), $qstr);
return;
@@ -155,7 +157,7 @@ class core_index_index_controller extends eController
->setLegacyQstring($qstr);
$request->routed = true;
define('e_FRONTPAGE', true);
eFront::isLegacy('{e_BASE}'.$page);
return $this;
}