Gossamer Forum
Quote Reply
LinksSQL - Category
Hi Guys!
Does anybody know how to display category in a drop down menu?
I want be able display Category in drop down menu by putting something like:
<form method="post" method="Category">
</option><%category%> <option value="<%url%>">

</form>


Thank you
Dmitry
Quote Reply
Re: [doom] LinksSQL - Category In reply to
Hi

Create a global category_list

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;
}

Then just use that global..

I think that will work
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [doom] LinksSQL - Category In reply to
Hi katabd!

Thanks for response.
But it's not working.
It can't recognize the new tag - Unknown Tag: 'category_list'


Thank you
Dmitry
Quote Reply
Re: [doom] LinksSQL - Category In reply to
Hi

I juts tried it and it is working for me

Use cat_list to name the sub and then use <%cat_list%> in your templete
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] LinksSQL - Category In reply to
Appreciate you help.
But i still can't get it work.
Can you show me the template where you implemented it?

Thank you
Dmitry
Quote Reply
Re: [doom] LinksSQL - Category In reply to
http://www.2muslims.com/...namic_editors_signup
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [doom] LinksSQL - Category In reply to
I'm assuming you don't have any spaces in the global you put in, i.e it may look like "category_drop", but in fact is " category_drop" or "category_drop ". I don't think Links SQL likes it when its like that. Otherwise as katabd said, the code is fine, and should work.

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates