SSI with CSS Menu?

Soldato
Joined
25 Mar 2004
Posts
16,007
Location
Fareham
Hi all,

Has anyone used SSI with a CSS menu successfully?

I have some pages which I want to share a menu, so I figured I could make a menu html page and link to that from each page using ASP Server Side Includes. Saves having to write the menu out on each page each time.

So my page content goes like this:

Code:
<html>

	<head>

		<link href="style.css" rel="stylesheet" type="text/css" />

	</head>

	<body>

		<!--#include file = "menu.html" -->
		<div id="container">
		rest of page content here...
		</div>

	</body>

</html>

Problem is, how do I define the active page on the menu?

At the moment the code in the menu.html can define the selected button using CSS classes, but obviously this changes whenever a different page is loaded, is there a way to update the active page on change?

Code:
<div id="centeredmenu">
   <ul>
      <li><a href="#">Tab one</a></li>
      <li><a href="index.aspx" class="active">Tab two</a></li>
      <li><a href="#">Tab three</a></li>
      <li><a href="#">Tab four</a></li>
   </ul>
</div>

Thanks!
 
Back
Top Bottom