Jump to content

Create a Universal Menu for Site


Kcarson

Recommended Posts

As I have started working on my website, I have found the number of pages growing quickly, which is good (more content). I however have also noticed that when I need to make changes to the overall layout/menu of the site, I have to make the changes on each individual page. I learned about CSS and have used that for the styling and so forth, which definitely helps. I now am wondering what the best method would be for the menu (about 6 links right now). My main fear is that after adding all the other pages, I will one day decide I need to add an additional item to the menu and then I will be forced to add it in 15-20 pages or so (not desired by any means).I have looked into the virtual includes, but wasn't sure if there was a better method out there or if PHP, ASP, or JavaScript might be able to help me out as well, or if there might also be a way to do this using CSS. Well, let me know.Thanks in advance.

Link to comment
Share on other sites

there are so many different ways to accommodate your situation. the best is probably to switch over to a scripting language as soon as possible. Now, that doesn't mean you have to a whole heck of alot of work. But, show one - asp, php, cold fusion, and then get yoru site in that environment - if its noit already. Then just use the "include" function for the selected language. Pull you navigation out, into a seperate file and then replace all the menus on all the pages with the respective include call.If, for instance, you are already hosting your website on IIS, then it is likely your provider "gives" you the ASP engine for free. So, just add:<!--#include file="includes/navigation.inc"-->to all your pages and you are set.

Link to comment
Share on other sites

Thanks for the suggestions. I definitely do not want to it using frames.....I am trying to make the entire site as efficient and clean as possible....frames kind of defeat that purpose.After more research, and based on suggestions listed above, I have found the following information, I am including it for others who might have the same question:Basically, what is needed is to use Server Side Includes (SSI)HTML - www.boutell.com/newfaq/creating/include.htmlASP - www.w3schools.com/asp/asp_incfiles.aspPHP - www.w3schools.com/php/php_includes.aspIn all cases, the menu would be put in a separate page and included using the various methods.From what I can tell, the best thing to do is either use ASP or PHP, and there are no major differences as far as this subject is concerned other than familiarity with the language.Thanks for pointing me in the right direction, and hopefully this information can benefit others who might face a similiar situation.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...