Thank you gjh42, for looking into this for me!
But I found a much simpler solution, if anybody else needs to do something like this just use "preg_replace_callback" after loading and producing the menu list, with it you can replace whatever you want.
My function:
$count = 1;
$menulist = preg_replace_callback('/level1/', 'rep_count', $menulist);
function rep_count($matches) {
global $count;
return '#section' . $count++;
}
$menulist = str_replace('<ul data="#section1">','<ul data="#section1" class="current">',$menulist);


Reply With Quote
