php Sidebar Tree Menu

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dannylam4
Forum Newbie
Posts: 2
Joined: Thu Mar 04, 2010 4:29 pm

php Sidebar Tree Menu

Post by dannylam4 »

Hello! I'm new to php and am working with a team doing some web stuff. Anyway, I was tasked to do the sidebar filter, but for now, I'm just trying to slowly work my way up. I was wondering if anyone could help me with a sidebar that shows and hides submenu categories. I managed to do one with a mix of jquery and html, but they wanted to stick with purely php. I tried to follow this: http://devzone.zend.com/article/1309, but couldn't get it working right.

My result was thus: http://www.cs.drexel.edu/~dl84/omnomenon/treemenu.php
And I'm basically trying to get something that looks more like this: http://www.cs.drexel.edu/~dl84/omnomenon/Example.php

Thanks for the help!
olidenia
Forum Newbie
Posts: 19
Joined: Mon Apr 28, 2008 12:38 pm

Re: php Sidebar Tree Menu

Post by olidenia »

Purely php? no javascript at all?

Here is an example but it contains javascript: http://www.phpguru.org/static/treemenu.html
olidenia
Forum Newbie
Posts: 19
Joined: Mon Apr 28, 2008 12:38 pm

Re: php Sidebar Tree Menu

Post by olidenia »

Here is a good one pure php backed up by css: http://www.hebig.org/temp/css_menus_in_php.txt
dannylam4
Forum Newbie
Posts: 2
Joined: Thu Mar 04, 2010 4:29 pm

Re: php Sidebar Tree Menu

Post by dannylam4 »

Ah, cool, I think I'm getting this... I managed to get a list and everything working, which is sweet, and it looks like I just make them appear and disappear by saying print_nav and print_subnav. One last question though, cause I don't think this is really explained, how would I go about doing...

if (Category1 clicked){
print_subnav(1);
}

Sorry for such a newb question, haha. Thanks again for the help! Here's what it's starting to look like, in case you were wondering:
http://www.cs.drexel.edu/~dl84/omnomenon/menu.php
Post Reply