Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Global problem with email template

Quote Reply
Global problem with email template
Hi,

I have a global as follows:

Code:

<%display_listingtype%>

sub {
my $tags = shift;
my $listing = $tags->{ListingType};
if ( $listing eq 'BC' ) {
$listing = 'Basic Link';
} elsif ( $listing eq 'PY' ) {
$listing = 'Priority Link';
} elsif ( $listing eq 'PM' ) {
$listing = 'Premium Link';
}
return $listing;
}


When I call it from add_success.html, it works fine.

When I call it inside "link_added.eml" as below, I get this error:

Unknown Tag: 'display_listingtype' submitted at xxxxxxxxxxxx:

Code:

To: <%config.db_admin_email%>
Subject: <%display_listingtype%> submitted at xxxxxxxxxxxx: <%Title%>
From: <%config.db_admin_email%>




Thanks in advance.

Regards,
Peter Puglisi
www.ausfreedom.com
Ultimate Freedom is our game.