HI everybody,
i have a problem with this global
sub {
my (@output,$sth,$hash,$cond);
my $catid = $_[0];
my $search_db = $DB->table('Links','CatLinks','Category');
$search_db->select_options ("ORDER BY Contact_Name");
my $all_ids = $DB->table('Category')->children($catid);
push @$all_ids, $catid;
$cond = GT::SQL::Condition->new('isValidated','=','Yes', 'CategoryID', 'IN', $all_ids);
$sth = $search_db->select( ['DISTINCT(Contact_Name)'],$cond);
while ($hash = $sth->fetchrow_hashref) { push @output, $hash;}
return \@output;
}
in the moment the global can show me the all the Contact Names of the cats and subcats
<%loop contact_name($ID)%>
<%Contact_Name%>
<%endloop%>
but I want to display a Picture of the Contact_Name on the Category page
<%loop contact_name($ID)%>
<img border="0" src="/images/Name/<%Contact_Name%>.jpg">
<%endloop%>
is there any possibility to generate a Contact_Name
without any forbidden signs like spaces and so on.
it is true that the as_url only can clean catnames?
Thank You Marina
i have a problem with this global

sub {
my (@output,$sth,$hash,$cond);
my $catid = $_[0];
my $search_db = $DB->table('Links','CatLinks','Category');
$search_db->select_options ("ORDER BY Contact_Name");
my $all_ids = $DB->table('Category')->children($catid);
push @$all_ids, $catid;
$cond = GT::SQL::Condition->new('isValidated','=','Yes', 'CategoryID', 'IN', $all_ids);
$sth = $search_db->select( ['DISTINCT(Contact_Name)'],$cond);
while ($hash = $sth->fetchrow_hashref) { push @output, $hash;}
return \@output;
}
in the moment the global can show me the all the Contact Names of the cats and subcats
<%loop contact_name($ID)%>
<%Contact_Name%>
<%endloop%>
but I want to display a Picture of the Contact_Name on the Category page
<%loop contact_name($ID)%>
<img border="0" src="/images/Name/<%Contact_Name%>.jpg">
<%endloop%>
is there any possibility to generate a Contact_Name
without any forbidden signs like spaces and so on.
it is true that the as_url only can clean catnames?
Thank You Marina
