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

Products: Gossamer Links: Development, Plugins and Globals: Re: [pshadow] Limit category a user can add a link: Edit Log

Here is the list of edits for this post
Re: [pshadow] Limit category a user can add a link
I think I figured it out using another global, posting if others have similar idea:

sub {

my $id = $_[0];

my $cat_tbl = $DB->table('Category');
my $category_full = $cat_tbl->select(['Name'],{ ID => $id })->fetchrow;
return if !$category_full;

my ($name) = split /\//, $category_full;

return { CatUserMatch => $name };

}

this gets me the Name based on Category ID, then in the add.cgi I have:
<%cat_user_match($ID)%>
<%if CatUserMatch eq $Username%>

seems to work...

Last edited by:

pshadow: Sep 25, 2005, 2:31 PM

Edit Log: