Gazing into my crystal ball I observed "mcnewsxp"
<> writing in
news:iarqt2$i25$:
> i have setup css and am using <div><ul> <li> tags for my tabbed
> navigation. i'd like to put the menu options in an include file. i
> have an <li class="active">, but i don't know how to set the "active"
> page so i am hard coding the menu in every page.
> without asking me for a URL can someone tell me how to make this work.
> tia,
> mcnewsxp
>
>
You could do it server side. I do this all the time.
<?php
$thisurl = "contact.php";
?>
<div id="nav">
<ul>
<li><?php nav("index.php","Home",$thisurl) ?></li>
<li><?php nav("contact.php","Contact",$thisurl) ?></li>
<li><?php nav("about.php","About",$thisurl) ?></li>
</ul>
</div>
<?php funtion nav($uri,$page,$thisurl)
{
if($uri==$thisurl)
{echo "<a href='$uri' class='active'>$page</a>";}
else
{echo "<a href='$uri'>$page</a>";}
}
?>
}
Mine is actually a little more elaborate than that, but I think you get
the idea.
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share