Posted: Fri 5. Nov 2004, 10:39
Mhhh... maybe cheating up a bit the code..
In this way, the last element of the list will have a class declaration:
In your example it will sound like this:
<div id="topnav">
<ul>
<li class="first"><a href="index.php?home"
class="current">Home</a></li>
<li><a href="index.php?contact_pks">Contact</a></li>
<li class="topnav_last"><a href="#">Site Map</a></li>
</ul>
</div>
Check the HTML source code to see how the script generates classes and ids for the list element.
Code: Select all
//------[FIND]-----------
if($thisactive) {
$css_list .= " id=\"".$class."_active\"";
$activated = 1;
}
//----------[AFTER ADD]-------
if(next($top_struct) == false){
$css_list .= " class=\"".$class."_last\"";
}
In your example it will sound like this:
<div id="topnav">
<ul>
<li class="first"><a href="index.php?home"
class="current">Home</a></li>
<li><a href="index.php?contact_pks">Contact</a></li>
<li class="topnav_last"><a href="#">Site Map</a></li>
</ul>
</div>
Check the HTML source code to see how the script generates classes and ids for the list element.