Page 1 of 1

php Sidebar Tree Menu

Posted: Thu Mar 04, 2010 4:39 pm
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!

Re: php Sidebar Tree Menu

Posted: Thu Mar 04, 2010 6:22 pm
by olidenia
Purely php? no javascript at all?

Here is an example but it contains javascript: http://www.phpguru.org/static/treemenu.html

Re: php Sidebar Tree Menu

Posted: Thu Mar 04, 2010 6:25 pm
by olidenia
Here is a good one pure php backed up by css: http://www.hebig.org/temp/css_menus_in_php.txt

Re: php Sidebar Tree Menu

Posted: Fri Mar 05, 2010 5:10 pm
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