Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

jump to main-cats with a drop-down menu...

Quote Reply
jump to main-cats with a drop-down menu...
Hi,

I search in the forums for a dynamically created dropdownbox with the main-categories similar to:

http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=233055#233055

But this one is used for the search-functionality.

What I want is to jump the the main-categories with a dropdown choice. (for dynamic and static build)

thanks,
ron
Quote Reply
Re: [rsahertian] jump to main-cats with a drop-down menu... In reply to
Try the following global

sub {
my $tags = shift;
my $cat_db = $DB->table('Category');
$cat_db->select_options("ORDER BY Full_Name");
my @root_cats = $cat_db->select (['Full_Name'])->fetchall_list;
my $output;
foreach my $root_cat (@root_cats) {
my $url = $cat_db->as_url($root_cat);
$output .= qq~<option value="$root_cat">$root_cat~;
}
return $output;
}
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] jump to main-cats with a drop-down menu... In reply to
Hi,

That doesn't do the trick. It must jump to the main-cats. I presents only a list.

Thanks,
Ron
Quote Reply
Re: [rsahertian] jump to main-cats with a drop-down menu... In reply to
Yes it does.

In your templete assuming you called the global cat_list do:



<%if links%>
<tr>
<td width="100%" bgcolor="<%color_dark%>" valign="top" align="center">
<b><%body_font%>Top Categories Menu:</b></font></td>
</tr>
<tr>
<td width="100%" valign="top">
<FORM ACTION="<%db_cgi_url%>/nph-redir.cgi" METHOD="POST">
<SELECT NAME="dest" style='background-color:<%_color_light%>'>
<%cat_list%>
</SELECT><BR>
<INPUT TYPE="SUBMIT" VALUE="Jump There!">
</td></FORM>
</tr>
<%endif%>
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] jump to main-cats with a drop-down menu... In reply to
Thanks for this cool global!

I set it up as per instructions, but found that
nph-redir.cgi is missing.

Where do you find nph-redir.cgi? I can't find this in Links Sql 2.12.
Quote Reply
Re: [webslicer] jump to main-cats with a drop-down menu... In reply to
Attached is the file..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory

Last edited by:

katabd: Aug 14, 2003, 12:48 PM