[rt-users] Include Template in another template
Kevin Falcone
falcone at bestpractical.com
Fri Sep 5 10:15:46 EDT 2014
On Fri, Sep 05, 2014 at 01:57:15PM +0200, Tobias H. wrote:
> I would like to know if there is any possibility to include a template
> into another one.
>
> To clearify what I would like to do: I want to put the name of the
> company and some other legal information on the bottom of any email
> that is outgoing, but in case of a change I don't want to edit every
> template. So i just would like to create a template called "Footer"
> and include this in every other template.
While you can load another template and parse it and included it, for
a footer I'd honestly write a tiny extension with
package RT::Site::Foo::Emails;
sub Footer {
return "long footer string";
}
1;
install that and from my templates just call
{ RT::Site::Foo::Emails::Footer() }
and be done with it.
Loading and parsing and including another template is almost always
more error prone.
-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 221 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140905/c4da9271/attachment.sig>
More information about the rt-users
mailing list