From 50fff3e7770f32cc655cf231cde5aa67969da95c Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 3 Jun 2016 19:40:17 -0700 Subject: [PATCH] Give each theme layout a unique CSS id. --- e107_admin/cpage.php | 8 ++++++++ e107_core/templates/header_default.php | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index eb5526bb6..4b79c787c 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -576,6 +576,14 @@ class page_admin_ui extends e_admin_ui $this->fieldpref = array("page_id","menu_name", "menu_title", 'menu_image', 'menu_template', 'menu_icon', 'page_chapter', 'menu_class'); + + if(e_DEBUG) + { + $this->fields['menu_name']['inline'] = true; + } + + + ### Parse aliases again or all filters shall fail due to the menu hack! $this->_alias_parsed = false; $this->parseAliases(); diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php index c26de85d0..750f4b68f 100644 --- a/e107_core/templates/header_default.php +++ b/e107_core/templates/header_default.php @@ -93,6 +93,7 @@ if (!function_exists("parseheader")) { if (preg_match("/{.+?}/", $line)) { + $line = str_replace('{THEME}',THEME_ABS, $line); // Quick-fix allow for use of {THEME} shortcode. echo $tp->parseTemplate($line, true, $sc)."\n"; // retain line-breaks. } else @@ -661,7 +662,10 @@ echo "\n"; } $HEADER = str_replace("{e_PAGETITLE}",deftrue('e_PAGETITLE',''),$HEADER); - + + $body_onload .= " id='layout-".e107::getForm()->name2id(THEME_LAYOUT)."' "; + + if(!deftrue('BODYTAG')) //TODO Discuss a better way? {