Display all subcategories in the menu at once?

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
blarg
Posts: 3
Joined: Wed Mar 22, 2006 12:07 pm

Display all subcategories in the menu at once?

Post by blarg »

Is there a way to have all the subcategories displayed at once in the menu, in stead of only having them appear when you're inside the parent category?

One way of doing this would be to assign class="active" onto all the category links, but where would I change that?
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you can see all categories when you click on the "show all categories" link.

It would be a bigger hack to display all categories at once.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
blarg
Posts: 3
Joined: Wed Mar 22, 2006 12:07 pm

Post by blarg »

Thing is I have a two level dropdown menu, and right now the second level with the subcategory links only works if I'm currently viewing the parent category.

Is there something I could modify in category.php to make it so that all categories are active, or something like that?
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you can try to change this line index.php from

Code: Select all

"showCategories" => $tree->printCategories($cat),
to

Code: Select all

"showCategories" => $tree->viewTree(),
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
blarg
Posts: 3
Joined: Wed Mar 22, 2006 12:07 pm

Post by blarg »

Thanks! Works like a charm
Post Reply