[rt-users] new to creating templates

Jacob Helwig Jacob at buschs.com
Sun Feb 18 08:19:17 EST 2007


Try just having {"This is a test"}, instead of the print.  From looking at my templates, whenever a variable needs to be printed, it's just left bare on a line.

For example, how $resolved_message is printed in http://wiki.bestpractical.com/index.cgi?AddTicketHistoryToMail

Also note how {$Ticket->Subject}, {$Ticket->QueueObj->CorrespondAddress()}, and {Transaction->Content()} are all done without a print.


From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Chuck Danger
Sent: Thursday, February 15, 2007 21:00
To: rt-users at lists.bestpractical.com
Subject: [rt-users] new to creating templates

Hi-

I'm sorta new to creating my own templates and to RT in general.  One thing I would like to do is create a custom template that has some perl embedded in it.  The docs I found seem to indicate that I can use the Text::Template method of embedding perl, i.e., use '{}' to surround the code block, but that does not seem to work.  For a test, I just created a custom template with this (using Autoreplay as a example, but calling it "AutoTest":

Subject: AutoReply: {$Ticket->Subject}


Greetings,

This message has been automatically generated in response to the
creation of a trouble ticket regarding:
    "{$Ticket->Subject()}".

{print "This is a test\n";}

                        Thank you,
                        {$Ticket->QueueObj->CorrespondAddress()}

-------------------------------------------------------------------------
{$Transaction->Content()}

When I receive the reply from this template, where it should be printing out "This is a test", I just get "main::STDOUT".

Thanks-
Chuck C.

________________________________________
Don't get soaked. Take a quick peak at the forecast 
with theYahoo! Search weather shortcut.



More information about the rt-users mailing list