Gossamer Forum
Home : Products : Links 2.0 : Customization :

categories as select field in menu

Quote Reply
categories as select field in menu
Hi all!

Can anyone tell me, what I need to do, to have a select field with all categories in it at the top of a page as a menu.

Hereby the subcategories should be somehow indented, like:

Main Category_a
SubCategory_a1
SubCategory_a2
Main Category_b
SubCategory_b1
SubCategory_b2

etc. ...
Quote Reply
Re: categories as select field in menu In reply to
This has been discussed before in this Forum.

Search for the following keywords:

category_list hopto

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Quote Reply
Re: categories as select field in menu In reply to
I did not write the Mod, and I do not have time to edit it. May be you could ask people in the hopto Topic if they know about changing it to fit your needs.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: categories as select field in menu In reply to
Is there a way to have it like this:

1)
Only the main categories (as shown on the homepage) are build into the list?

2)
Categories are displayed like this:
MAIN 1
SUB 1a
SUB 1b
MAIN 2
SUB 2a
SUB 2b

whereas in the subcategories the name of the main category is not shown anymore.

Also, is there a way to only display the nonenglish versions of the category names?

Thanks for some help on this :-)
Quote Reply
Re: categories as select field in menu In reply to
Hello !!!

Is it possible to list only the subcategories for a determinated category instead list all ?

eg.

I want to put a drop down in my Sports category listing only his subcategories thus:

Category:
Sports

Drop Down:
Baseball
Soccer
Basketball
Football


Any ideas to make this ???


Regards,


marcoBR


Quote Reply
Re: categories as select field in menu In reply to
Did you figure this out? I'm looking for the same thing, I can list all sub categories for the database in a drop down but not just the links in the current category in a drop down box..


Quote Reply
Re: categories as select field in menu In reply to
Hello twisted !!!

Take a look in this thread ...

http://gossamer-threads.com/...w=collapsed&sb=5


Regards,

marcoBR

Quote Reply
Re: categories as select field in menu In reply to
Yes, I've followed that and I see you can hard code the category of choice that you want it to list BUT how can we only include the current category in the list?

Another words, if I'm currently in the Books and Magazines directory, I just want to show the subcategories in that directory not all the subcategories in the DB, this is my problem right now ..

When my list is made it is pulling in all the subcategories ..

Here is my Code

# This one is automatic - requires javascript code in header of pages
###################################
sub hopto_subcategory{
###################################
$output = qq~
<form name="subcatform">
<select name="subcatsite" size=1 onChange="javascript:formHandler2()">
<option value="">Browse Deals
<option value="">------------------------------- ~;
CATEGORY: foreach $cat (sort keys %category) {
# next CATEGORY if ($cat =~ /^\s*$/); # Shows Everything
# next unless ($cat =~ m,^([^/]*)$,); # Shows ONLY Main Categories
next if ($cat =~ m,^([^/]*)$,); # Shows ONLY Sub-Categories
$title = &build_unlinked_title ($cat);
@categorylist = split (/\//, $cat);
$p = rindex($title,":")+1;

if ($p > -1) { $zcat = substr($title, $p); #####

#if ( rindex($title,$zcat) > -1 ) {

$output .= qq~<option value="$build_root_url/$cat/"> $zcat ~;
} else {;}
}
$output .= qq~</select></form>~;

}