Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Use globals in email

Quote Reply
Use globals in email
I'm trying to send an email using a template which calls globals but I'm getting Unknown Tag errors for the globals. Any ideas how to do this?

This is what I'm using at the moment:

my $cfg = Links::Config::load_vars();
my $formatted_message = GT::Template->parse ('template.txt', {%$cfg , %$rec}, { compress => 0, root => $CFG->{admin_root_path} . '/templates/default' } );

EDIT: Fixed it by using Links::SiteHTML::display instead.

Last edited by:

afinlr: May 3, 2004, 3:39 PM
Quote Reply
Re: [afinlr] Use globals in email In reply to
Can you please give me a (dummy) explanation on how to use a global in an email?

Thank you.
Quote Reply
Re: [nt6] Use globals in email In reply to
Hi,

It depends what you are using to send the email. I think that if you are sending emails using the email mass mailer in admin you should just be able to put the global tag in the template (although I could be wrong - but I'm sure that I've written globals in the past for people to use in these emails). Try sending a message to yourself to see whether it works.

Laura.
The UK High Street
Quote Reply
Re: [afinlr] Use globals in email In reply to
Quote:
EDIT: Fixed it by using Links::SiteHTML::display instead.

I know the feeling. The only bit I don't like about using Links::SiteHTML, is the fact you have to use the .html extension, which makes it that little bit more confusing for people to know which templates do what :(

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!
Quote Reply
Re: [Andy] Use globals in email In reply to
Totally agree.