[rt-users] Sample for RTFM::Extension::ArticleTemplates using inside a template ?

Daniel Schwager Daniel.Schwager at dtnet.de
Thu Feb 24 17:56:18 EST 2011


> It does not let you dynamically load an article from a Template, you
> could do that without the extension just by writing code in normal RT
> Templates.

Sure. But I would not like to repeat myself in 3 templates (3 times the
same
signature/code in 3 templates) - for one queue. 

I would like to move / refactor this code out of  the templates to one
place, 
a RTFM article. Then, just "source" the text from the signature-article
to 
the template.

Something like this:

my $rtfm = RT::FM::Article->new($Ticket->CurrentUser);
my ($id,$msg) = $rtfm->Load("Signature1"); 
if (!id) { $RT::Logger->debug("failed .."); } else { "HOWTO print a CF
xxx from the loaded article ?"; }

kind regards
Danny




More information about the rt-users mailing list