Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Menu Systems 1

Status
Not open for further replies.

Hondy

Technical User
Mar 3, 2003
864
GB
Hi

Can anyone tell me what the best way to go about designing a menu is? Are server side includes the way to go or maybe Flash?

I don't want to adjust it on millions of pages, what's the best way to do it?

Thanks

H
 
It depends on what language you're using. For example, in ColdFusion I just create one header file and use on any/all of my pages. Whatever I change in that one file will be changed on all of the pages that use it.



Hope This Helps!

Ecobb
Beer Consumption Analyst

"My work is a game, a very serious game." - M.C. Escher
 
Ecobb - I was going to use Dreamweaver MX to create the pages in PHP.

Any ideas to using one centrally managed Menu system?

Thanks
 
An included file has the advantage of allowing you to easily make sitewide changes simply by editing that one file.
The exact way in which the menu operates is up to you. It could be a simple list of links, some images or a combination of CSS and list elements to create dropdown/popup/slideout menus. The world is your lobster.

Creating a menu as a flash file means you are still using an included file. However you are relying on the user having the appropriate plugin to navigate your site. Bear in mind that search engine crawlers (as a rule) don't have the ability to read the flash file and follow its links. To my mind, Flash is a "no no" in this case.

Foamcow Heavy Industries - Web design and ranting
Toccoa Games - Day of Defeat gaming community
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
"I'm making time
 
ok, sounds good foamcow.

So, can you direct me anywhere to have a look at a tutorial? Does an included file also mean a java based menu with a "contents.js" style file? What makes it a server side included file? (i'm a design noob)

Thanks!
 
It's a server side included file if it's a file on the server that's included in the HTML when the page is sent to the browser.

The quickest way for me to show you is by directing you to my own site


See the navigation on the left?
It exists as a seperate bit of code to the rest of the page.


That's the menu code in isolation. It's just XHTML, nothing more special.
(I broke my own rule there and gave it a .inc extension. You are better off using .html really, though it's not important here)

I am using PHP to include the file so on each page in my site I have this where the menu would be:
Code:
<?php
include("navMenu.inc");
?>

That's it.
When my webserver gets a request for a page on my site, it reads the PHP and assembles the page, including the navigation file, then sends the resulting HTML back to the user's browser.

This means that if I add or remove a page I can simply edit that one file (navMenu.inc) and the new navigation is applied to every page in the site.


Regarding Java and JavaScript.
1. Be under no illusion, they are TOTALLY different things.
Java is a full blown programming language that is suited (supposedly) to web applications as it is very compact and highly portable/platform independent.

JavaScript, is a browser scripting language that doesn't really bear any relation to Java. It can be used on a web page to control things on the USER side. Therefore, if it is disabled on a user's browser anything you do with JavaScript will not work.
For that reason (same as with Flash really), I would not use JavaScript alone to create a navigation system. There must always be a way to navigate the site if JavaScript is turned off.

Foamcow Heavy Industries - Web design and ranting
Toccoa Games - Day of Defeat gaming community
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
"I'm making time
 
Foamcow - thanks, thats exactly what I need to know to base the menu.

One thing though, how do you make the menu appear as a graphics like you have done?

When you say Java and Javascript, I was just being lazy I guess, I have never used Java and Javascript I usually use pre-built scripts :/

Thanks for taking the time to respond.
Cheers Chris - I'll check out the FAQ's
H

P.S. How do you send your pasties in the post foamcow??

 
Note - "One thing though, how do you make the menu appear as a graphics like you have done?" - sorry, not graphics, CSS right?
 
How do you make the included menu highlight the current page with a different CSS style?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top