Jump to content
Sign in to follow this  
Kcarson

Create a Universal Menu for Site

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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
it's a ugly way, but you'll only use HTML

lol - very well put! :)

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...