I don't think you can :/
%s is a special "replacement" string for GT::Template. AFAIK, there isn't anything else passed into this string.
However, you may want to try a global;
Code:
sub {
my $error = $_[0];
my $ID;
$error =~ m/(\d+)?/ and $ID = $1;
if ($error =~ /invalid/i) {
return "Invalid link: $ID";
} elsif ($error =~ /has expired/i) {
my $link = $DB->table('Links')->select({ID=> $ID})->fetchrow_hashref;
return qq|Sorry, $link->{Title} is currently invalid.|;
}
}
Call with;
<%new_global_name($error)%>
Note, the above global is untested.. but should work
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!