Old 04-01-2008, 11:23   #1 (permalink)
dksilvia
Registered User
 
Join Date: Jan 2008
Posts: 2
Menu template

Ok, I'm new to php, but I know how to include pages in other pages...actually that's about all I know. I'm pretty much using a top and a bottom page as well as a menu page to make my site come together. I'm not the one who updates it regurarly so I'm trying to make everything as easy as possible for my client.
My issue is, the amount of links on the sidebar is getting ridiculous and I want to shrink the subcategories so they're only open when I'm in that section of pages, but I still want to be able to edit the links from one single page so they change sitewide. I've already figured out how to do it with 6 different menu pages...but then I'm right back to editing links on 6 pages and copy/pasting everything...and that's what I'm trying to avoid. Any ideas?
I dont know what shape the site will be in when you look at it, I'm still working on cleaning it up before it goes live...
chelmsfordcommunityeducation.org/mirror

Last edited by dksilvia : 04-01-2008 at 13:01.
  Reply With Quote
Old 04-01-2008, 13:46   #2 (permalink)
Jayx
Now with added sarcasm.
 
Jayx's Avatar
 
Join Date: Aug 2006
Location: George, South Africa
Posts: 365
Send a message via MSN to Jayx Send a message via Skype™ to Jayx
Charity work I hope?
__________________
I made 100 posts and all I got is this stupid signature.
  Reply With Quote
Old 05-01-2008, 00:02   #3 (permalink)
dksilvia
Registered User
 
Join Date: Jan 2008
Posts: 2
It's for my Mom's office. They'll probably throw me a few bucks, but mostly I do it for fun anyway...which probably explains the 2am bedtime last night after finally giving up on it
  Reply With Quote
Old 05-01-2008, 09:17   #4 (permalink)
Chris_Crew
me
 
Join Date: Nov 2007
Location: Runcorn
Posts: 47
Send a message via MSN to Chris_Crew
javascript hide and unhide options maybe
  Reply With Quote
Old 06-01-2008, 01:44   #5 (permalink)
Shiro
shiro
 
Shiro's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 3,066
Javascript is probably your best bet, but if you want to do it in php, you can use a database to store the section names and the page names. Then call the names with php. This makes it really easy to add both sections and pages, because you just add everything to a new row in the table (or tables if you decide to use separate tables for the sections and the page names). To only show the names of the pages for the section you are in, have the script check to see if the current page is included in the section its outputting, and if it is, to output all the pages for that section. The rest of the sections will fail this test, so they wont be outputted.

You can put all this into one file, and include it into all pages that you program. This method is also good because it will still work even if a user has javascript turned off.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8