General questions about CMSimple
-
Till
- Posts: 337
- Joined: Tue May 20, 2008 7:20 am
- Location: Germany: Bremen
-
Contact:
Post
by Till » Thu Mar 05, 2009 10:07 am
kweku wrote:.....the menu highlight is not working as it did in the standard cmsimple 3.2.....
So, don't use it. It's a beta version anyway, I think, is'n it? Or maybe this is the reason
kweku wrote:....as i have made quite a few customizations.....
Till
-
kweku
- Posts: 90
- Joined: Sun Jan 18, 2009 3:37 pm
Post
by kweku » Thu Mar 05, 2009 11:07 am
sure, that's fair enough.
-
kweku
- Posts: 90
- Joined: Sun Jan 18, 2009 3:37 pm
Post
by kweku » Fri Mar 06, 2009 9:48 am
if anyone is interested i figured out the problem.
in cms.php there is a difference between 3.2 SE and standard version, i had to switch the code from the standard cms.php to the SE cms.php...
from line 457
Code: Select all
function li($ta, $st) {
global $s, $l, $h, $cl, $cf, $u;
$tl = count($ta);
if ($tl < 1)return;
$t = '';
if ($st == 'submenu' || $st == 'search')$t .= '<ul class="'.$st.'">';
$b = 0;
if ($st > 0) {
$b = $st-1;
$st = 'menulevel';
}
$lf = array();
for($i = 0; $i < $tl; $i++) {
$tf = ($s != $ta[$i]);
if ($st == 'menulevel' || $st == 'sitemaplevel') {
for($k = (isset($ta[$i-1])?$l[$ta[$i-1]]:$b); $k < $l[$ta[$i]]; $k++)$t .= '<ul class="'.$st.($k+1).'">';
}
$t .= '<li class="';
if (!$tf)$t .= 's';
else if(@$cf['menu']['sdoc'] == "parent" && $s > -1) {
if ($l[$ta[$i]] < $l[$s]) {
if (@substr($u[$s], 0, 1+strlen($u[$ta[$i]])) == $u[$ta[$i]].$cf['uri']['seperator'])$t .= 's';
}
}
$t .= 'doc';
for($j = $ta[$i]+1; $j < $cl; $j++)if(!hide($j) && $l[$j]-$l[$ta[$i]] < 2+$cf['menu']['levelcatch']) {
if ($l[$j] > $l[$ta[$i]])$t .= 's';
break;
}
$t .= '">';
if ($tf)$t .= a($ta[$i], '');
$t .= $h[$ta[$i]];
if ($tf)$t .= '</a>';
if ($st == 'menulevel' || $st == 'sitemaplevel') {
if ((isset($ta[$i+1])?$l[$ta[$i+1]]:$b) > $l[$ta[$i]])$lf[$l[$ta[$i]]] = true;
else
{
$t .= '</li>';
$lf[$l[$ta[$i]]] = false;
}
for($k = $l[$ta[$i]]; $k > (isset($ta[$i+1])?$l[$ta[$i+1]]:$b); $k--) {
$t .= '</ul>';
if (isset($lf[$k-1]))if($lf[$k-1]) {
$t .= '</li>';
$lf[$k-1] = false;
}
};
}
else $t .= '</li>';
}
if ($st == 'submenu' || $st == 'search')$t .= '</ul>';
return $t;
}
-
Till
- Posts: 337
- Joined: Tue May 20, 2008 7:20 am
- Location: Germany: Bremen
-
Contact:
Post
by Till » Fri Mar 06, 2009 5:59 pm
kweku wrote:in cms.php there is a difference between 3.2 SE and standard version, i had to switch the code from the standard cms.php to the SE cms.php...
So, that points out that cmsimple SE 3.2 contains the old menu code which is not ready yet for the parent option. However, if you exchange this code, some other function, Jens may have introduced, may not work anymore.
Till