Quote from: PaulGregory at Aug 01, 2006, 02:58 PM
Does the kludge
&topdivClass=`simon" id="mymenu`
work?
EDIT: In case it’s not obvious, the idea here is to trick DropMenu. DropMenu will start that string off with class=" and end with another ", but inside you’re ending the class early and starting the ID. DropMenu’s " to end the class ends up ending the ID.
Can’t have = in an argument.
In line 130, add:
// $topdivID [string]
// css id for DIV wrapping top level UL
$topdivID = (!isset($topdivID)) ? 'topdiv' : "$topdivID";
This allows you to add the &topdivID=`whatever` argument to the DropMenu call. It can be the same as the class name.
In lines 195, 257, 325 and 329, the calls to the MakeMap function, add $topdivID to the argument list somewhere.
Line 211, after the line that assigns the $topdivcls value, add (watch out for the space before id=):
$topdivname = (!empty($topdivId)) ? ' id="'.$topdivID.'"' : '',
The follwing line, addd the $topdivnam to the output:
$topdivblk = ($topdiv) ? "<div$topdivcls$topdivname>" : '';
that should do the trick; it may have a typo or something, I haven’t actually tested it. But it will be nicer than actually hardcoding an Id into the snippet; if you want to you can do that in the last line of code above, in the $topdivblk = line, instead of adding $topdivname just add id="whatever".