Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as PHP by ultor ( 17 years ago )
<div id="menu">
<ul>
<?php
$i=0;
while(sfConfig::has('app_navigation_'.$i)){
$menu_item = sfConfig::get('app_navigation_'.$i);
$route = new sfRoute(url_for($menu_item['route']));
echo "<li><a ";
if($_SERVER['REQUEST_URI']==url_for("@homepage") &&
$menu_item['route']=='@homepage')
echo "class='active'";
else if(ereg($route->getPattern(),$_SERVER['REQUEST_URI']) &&
$menu_item['route']!='@homepage')
echo "class='active'";
echo " href='".url_for($menu_item['route'])."'>".$menu_item['name']."</a></li>";
$i++;
}
?>
</ul>
</div>
Revise this Paste