From 65844bcb06ccefced141b6fa90db7f4d33f533e3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Mar 2019 22:31:52 +0100 Subject: [PATCH] Fix detection of current page --- htdocs/website/class/website.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 6bfbadfb197..266eac65ebc 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -1106,7 +1106,9 @@ class Website extends CommonObject $pageid = 0; if (! empty($websitepagefile)) { - $pageid = str_replace(array('.tpl.php', 'page'), array('', ''), basename($websitepagefile)); + $websitepagefileshort=basename($websitepagefile); + if ($websitepagefileshort == 'index.php') $pageid = $website->fk_default_home; + else $pageid = str_replace(array('.tpl.php', 'page'), array('', ''), $websitepagefileshort); if ($pageid > 0) { $tmppage->fetch($pageid); @@ -1173,7 +1175,7 @@ class Website extends CommonObject height: '.$HEIGHTOPTION.'px; overflow: hidden; transition: all .3s ease; - margin: 0 50px 0 0; + margin: 0 0 0 0; vertical-align: top; } .componentSelectLang'.$htmlname.':hover, .componentSelectLang'.$htmlname.':hover a { background-color: #fff; color: #000 !important; }