1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 17:44:37 +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

@@ -930,11 +930,18 @@ if(!defined("THEME_LAYOUT"))
if(is_array($cusPagePref) && count($cusPagePref)>0) // check if we match a page in layout custompages.
{
//e_SELF.(e_QUERY ? '?'.e_QUERY : '');
$c_url = e_REQUEST_URL.(e_QUERY ? '?'.e_QUERY : '');// mod_rewrite support
$c_url = str_replace(array('&'), array('&'), e_REQUEST_URL);//.(e_QUERY ? '?'.e_QUERY : '');// mod_rewrite support
foreach($cusPagePref as $lyout=>$cusPageArray)
{
if(!is_array($cusPageArray)) { continue; }
// NEW - Front page template check - early
if(in_array('FRONTPAGE', $cusPageArray) && ($c_url == SITEURL || rtrim($c_url, '/') == SITEURL.'index.php'))
{
$def = $lyout;
break;
}
foreach($cusPageArray as $kpage)
{
if(substr($kpage, -1) === '!' )