Allora, qualcosa di questo tipo dovrebbe funzionare:
echo '<script type="text/javascript">
var moving;
function move(b){clearTimeout(moving); if(b<0&&parseInt(Menu.left)>-Width||b>0&&parseInt(Menu.left)<0){moving=setTimeout(\'move(\'+b+\')\',slideSpeed); theleft+=b; Menu.left=theleft+\'px\'}}
function startMenu(menu,barText){document.write(\'<div id=ssm style="width:\'+(Width+30)+\'px; left:-\'+(Width)+\'px; top:\'+Yoffset+\'px; \'+(isStatic?\'\':\'top:expression(\'+Yoffset+\'+(y=document.body.scrollTop)+\\'px\\'); position:fixed!important; \')+\'position:absolute; z-index:9" onmouseover=move(10) onmouseout="clearTimeout(moving); moving=setTimeout(\\'move(-10)\\',waitTime)"><table class=mainbg width=100% cellpadding=4 cellspacing=1><tr><td class=title align=center><b>\'+menu+\'<\/b><td class=ww rowspan=100 style="width:20px;padding:12px 4px 12px 4px;font-size:10pt;font-weight:bold" align=center valign=middle>\'+barText); Menu=document.getElementById("ssm").style; theleft=-Width}
function addItem(text,link){document.write(\'<tr><td class=aa><span class=web><a HREF=\'+link+\'>\'+text+\'<\/a><\/span>\')}
function endMenu(){document.write(\'<\/table><\/div>\')}
if(document.getElementById){
isStatic=false;
Yoffset=20;
Width=130;
slideSpeed=20;
waitTime=500;
startMenu("","P<br>a<br>s<br>s<br>i<br>o<br>n<br>G<br>a<br>m<br>e<br>s"); ';
foreach($context['mod_categories'] as $mod_cats){
foreach($mod_cats['boards'] as $mod_board){
echo '
addItem("' . $mod_board['name'] . '","' . $mod_board['href'] . '");
}
}
echo '
endMenu()}
</script>';
Io lo metterei... ... ... ...index.template.php da qualche parte prima che il tag head sia chiuso...
P.S.
Dico dovrebbe perché nella migliore tradizione non l'ho provato...
