Forum Moderators: mack

Message Too Old, No Replies

Navigation Menu Design

Creating navigation menus with PHP?

         

Clay213

4:41 am on May 2, 2004 (gmt 0)

10+ Year Member



Hi, I have been searching all over with not much luck on how to make a simple dynamic side menu. A good example of what I am talking about is the AlexKing website.

I would like to be able to do something similiar in PHP for my site, but unfortunately my programming skills are not what I would like them to be.

I have read various tutorials on the subject, but they are all really basic and bad looking menus.. So any help you could give would be awesome.

Thanks

[edited by: DaveAtIFG at 1:28 pm (utc) on May 2, 2004]
[edit reason] Removed specifics [/edit]

encyclo

10:53 pm on May 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, Clay213! You might want to review the terms of service [webmasterworld.com] for the forum which will explain why we don't discuss or link to specific sites, etc.

Could you give a short description of what you're trying to do with your menu? Are you wanting just to generate the contents relative to the page you're on, or are you looking for a drop-down menu?

Krapulator

11:14 pm on May 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Create your menu and save as "my_menu.html" and then use an include statement [google.com] on each page at the point you want the menu to appear

Clay213

11:17 pm on May 2, 2004 (gmt 0)

10+ Year Member



Sorry about the links.. this will be tougher to explain than I thought.

I am basically just trying to make a typical left side navigation menu.. that has the various categories for the site. I previously had one that was made with HTML and rollover images but I would like to avoid Javascript.

I'm going to be traveling on a long trip, and need to get my site set up so that it is as simple to maintain and update as possible. Which is part of why I would like to make the menu with PHP.

Right now, I found a script which I have put in a file named menu.php. It uses an array to populate the links and display's them as a list. I have a basic understanding of arrays.. but was wondering how I would go about making the menu more dynamic by storing the values in a database.. and possibly creating an admin type interface to add addition items to the menu.

That is where my knowledge is falling short.

I will post the code for the menu if that is allowed and will help.

encyclo

11:29 pm on May 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It sounds as if you really need a full-blown content management system rather than just a dynamic menu. That would allow you to update your site from anywhere with just a web browser.

There are loads of free, pre-written PHP-based CMS out there which you can adapt to your needs - it just depends on what kind of a site you have. If you have a travel diary / weblog kind of site, you should look as Wordpress - [wordpress.org...] . For a portal-type site, look at Mambo server - [mamboserver.com...] .

Clay213

11:37 pm on May 2, 2004 (gmt 0)

10+ Year Member



Encyclo, I'm actually using wordpress right now for the journal part of my site. I just need the menu to link everything up together..

*shrug* maybe I can just hack wordpress up enough so that I can use it for the whole site. Though that sounds less than ideal. Plus they are releasing 1.2 soon and from what I have used of the beta I might as well wait for that before I do any major changes.

I guess I can deal with what I have for the menu now.

<edit>

But that reminds me, and you have got my interest. Can you give me any further ideas or advice on CMSes? The only experience I have had with something like that was with PostNuke(and it was an awful experience).

isitreal

7:32 pm on May 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Right now, I found a script which I have put in a file named menu.php. It uses an array to populate the links and display's them as a list. I have a basic understanding of arrays.. but was wondering how I would go about making the menu more dynamic by storing the values in a database.. and possibly creating an admin type interface to add addition items to the menu.

You can do this with flat files fine, just build the arrays out of flat file data, no need to use a database unless you want to.

If you are already using an array based menuing system, that's how I do all mine, by the way, it's either just a matter of switching to databases, or plain text files, it's pretty irrelevant which method you use, either way you are going to read the contents of the data holder, then add or subtract an element, but how often do you really need to update a drop menu type item? You could just ftp in through msie, download the array file, make the array change in notepad, upload it, and you're on your way, very fast, easy, no programming, no extra work, you can do that from most internet cafes that support ftp, not all do.