View Full Version : Same Menu on Multiple Pages

07-05-2005, 08:20 AM
OK, this may have been discussed elsewhere, but I can't seem to find it, so here goes. What I have is a simpel css menu. In the header, I obviously have the css and js files linked to and operating correctly. In fact, my site runs fine the way it is, but when i edit one of the menu entries in the body of the html code, i currently have to edit the entire site, going from page to page copying and pasting the new menu. is there a way so that i can have the menu in a single file and what all has to be in taht file?

below is what's in the header:

<link rel="stylesheet" type="text/css" href="css-js/anylinkmenu.css" />


<script type="text/javascript" src="css-js/anylinkmenu.js">

* AnyLink CSS Menu script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code


then I have my menu obviously in the body section. just thought an idea of the layout might help give an idea of what i want. :)

07-05-2005, 12:03 PM
My suggestion would be, convert all your files to php documents ( instead of index.html, index.php ) then once thats done, copy your "menu" code into a single php document called "menublah.php" or whatever. Then in place of your menu code on all those pages, replace with....


should work. enjoy.

07-05-2005, 12:26 PM
If your server doesn't support PHP you can probably do it with SSI....

07-05-2005, 05:29 PM
Or if you use a dreamweaver type program you could use library items.