PDA

View Full Version : Changing css navigation menu



Skinnybobb
05-25-2006, 08:26 AM
Hiya,
I have written a navigation menu for an intranet using unordered lists and positioned and formatted using and an external referenced css file. Good so far!

However, there will be several hundred pages this will get used on.
At some point in the future the navigation may/will change or extra tabs might get added, meaning I will have to add more entries to the html on each page as new list items. Not good!

Is there a way to reference external lists.

I dont really want to use any type of frame or javascript menu.
Please help.
Thanks
Mark

Skinnybobb
05-25-2006, 10:16 AM
Hiya all,
I've come up with a solution that might help others.

By using an .inc reference I can put all the menu items in one .inc file (I'm using an ASP page). So when I need to change any menu item I simply do it in the .inc file. :D

For example
my nav.inc file contains

<div id="tabs">
<ul>
<li id="current"><a href="Home.html"><span>Home</span></a></li>
<li><a href="Library.html"><span>Library</span></a></li>
<li><a href="Services.html"><span>Directorates</span></a></li>
<li><a href="Support.html"><span>Support</span></a></li>
<li><a href="News.html"><span>News</span></a></li>
<li><a href="About.html"><span>About</span></a></li>
<li><a href="About.html"><span>Help</span></a></li>
</ul>
<div id="topright">
<a href="accessability.html"><span>Accessibility</span></a>
<a href="search.html"><span>Search</span></a>
</div>
</div>

My page contains

<!--#include file="nav.INC"-->

I'm sure the masters may see down sides to this but Hey it works for me.
Cheers
Mark

Twey
05-25-2006, 10:31 AM
That's the only way to do it, really :)
However, it should be noted that the above code uses server-side includes, and will not work if your server does not have them installed and enabled.

walazins
06-23-2008, 08:52 PM
Will Search Engines have issues with link crawling in this case?