On Tue, Aug 25, 2009 at 14:47, Jerrad Pierce<jpie...@cambridgeenergyalliance.org> wrote: >> Including the template (as in the ForkTemplate contribution on the >> Wiki) didn't work, since I had variables to evaluate in each template, >> and doing it as ForkTemplate suggests ends up just pasting the perl >> code in the sub-templates, rather than evaluating them. Maybe wrap >> the template I loaded in an eval statement or something? I am a perl >> newbie, so I'm at a bit of a loss. > > Calling _ParseContent on your $obj instead of fetching the Content should > work?
And if that doesn't work (if it does, the wiki should be updated), you might heed the last sentence of ForkTemplate: The .. effect could also be achieved through the clever use of $self->SetTemplate in CustomCondition. i.e; do your switching to pick a template in a scrip. You don't to save on repeated content amongst templates that way though. Untested example: my $trans = $self->TransactionObj; return 0 unless $trans->Type eq "Create"; $self->SetTemplate( $condition ? 'foo' : 'bar' ); -- Cambridge Energy Alliance: Save money. Save the planet. _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com