What you could do is alter it to:
sub {
my $tags = shift;
my $link_db = $DB->table('Links','CatLinks');
my $cat_id = Your Category ID here;
my $limit = $tags->{Random_Limit} || 3;
my (@output, $sth);
$link_db->select_options ('ORDER BY RAND()', "LIMIT $limit");
$sth = $link_db->select ( { CategoryID => $cat_id });
while (my $hash = $sth->fetchrow_hashref) {
push @output, $hash;
}
return { Random_Loop => \@output }
}
Then just substitute the bold bit with the category id you want to pull from.
Code:
sub {
my $tags = shift;
my $link_db = $DB->table('Links','CatLinks');
my $cat_id = Your Category ID here;
my $limit = $tags->{Random_Limit} || 3;
my (@output, $sth);
$link_db->select_options ('ORDER BY RAND()', "LIMIT $limit");
$sth = $link_db->select ( { CategoryID => $cat_id });
while (my $hash = $sth->fetchrow_hashref) {
push @output, $hash;
}
return { Random_Loop => \@output }
}
Then just substitute the bold bit with the category id you want to pull from.