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:
11
class2.php
11
class2.php
@@ -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) === '!' )
|
||||
|
Reference in New Issue
Block a user