Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [Matt G] multiple categories - limit selections?

Quote Reply
Re: [Matt G] multiple categories - limit selections? In reply to
The easiest way would be with a plugin, something like a hook on add_link PRE and modify_link PRE, with some code like:

Code:
sub check_add {
my @cat_ids = $IN->param('CatLinks.CategoryID');
if (@cat_ids > 2) {
print $IN->header;
print Links::SiteHTML::display('add', { error => "Please only select 2 categories" } );
return;
} else {
return @_;
}
}

You would really need one of those per event (or a way of deciding which template to show)

Hope that helps

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread multiple categories - limit selections? Matt G 3000 Apr 28, 2012, 3:45 PM
Thread Re: [Matt G] multiple categories - limit selections?
Andy 2905 Apr 29, 2012, 12:41 AM
Post Re: [Andy] multiple categories - limit selections?
Matt G 2897 Apr 29, 2012, 8:42 AM