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

Kevin Falcone falcone at bestpractical.com
Thu Feb 24 19:10:51 EST 2011


On Thu, Feb 24, 2011 at 11:56:18PM +0100, Daniel Schwager wrote:
> > 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 ?"; }

Sure, that was my suggestion
You don't need RTFM::Extension::ArticleTEmplate in order to load an
Article from a normal RT article

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110224/d2453dc7/attachment.sig>


More information about the rt-users mailing list