Hi all, i use this code to get my pics on the site.
The problem is now that after the code a space is passed.
In template:
table, tr, td><%Logo%>/tr,/td,/table
without any space !
For the global i use:
sub {
my ($rec) = @_;
my $id = $rec->{ID};
if ($rec->{Logo}) {
my $links_db = $DB->table('Links');
my $fh = $links_db->file_info( 'Logo', $id );
my $location = $fh->File_RelativePath;
if ($fh->File_Name =~ /\.(jpg|gif)$/) {
return qq~<img src="/imgL1$location" width=100 height=80>~;
}
else {
return "Invalid file name.";
}
}
else {return "";}
}
Has someone a clue what the problem could be ?!
Robert
The problem is now that after the code a space is passed.
In template:
table, tr, td><%Logo%>/tr,/td,/table
without any space !
For the global i use:
sub {
my ($rec) = @_;
my $id = $rec->{ID};
if ($rec->{Logo}) {
my $links_db = $DB->table('Links');
my $fh = $links_db->file_info( 'Logo', $id );
my $location = $fh->File_RelativePath;
if ($fh->File_Name =~ /\.(jpg|gif)$/) {
return qq~<img src="/imgL1$location" width=100 height=80>~;
}
else {
return "Invalid file name.";
}
}
else {return "";}
}
Has someone a clue what the problem could be ?!
Robert