[Rt-commit] rt branch, new-style-templates, updated. rt-3.8.8-279-gaedb013

Shawn Moore sartak at bestpractical.com
Thu Aug 5 16:56:58 EDT 2010


The branch, new-style-templates has been updated
       via  aedb01387aab77eebfc301cfb264ddcd2eb2b743 (commit)
      from  d503fa73a8ad6298cef625daa308236841392e42 (commit)

Summary of changes:
 docs/templates.pod |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 59 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit aedb01387aab77eebfc301cfb264ddcd2eb2b743
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Aug 5 16:58:54 2010 -0400

    Some documentation for template types

diff --git a/docs/templates.pod b/docs/templates.pod
index d6a9a99..ab54905 100644
--- a/docs/templates.pod
+++ b/docs/templates.pod
@@ -61,5 +61,64 @@ A localization function. See L<Locale::Maketext>.
 
 =back
 
+=head2 Template Types
+
+Templates have a Type which dictates which level of code execution is
+allowed.
+
+Templates of type C<Perl> are evaluated using L<Text::Template>
+which allows arbitrary code execution. Only users which have the global
+C<ExecuteCode> privilege may write templates of type C<Perl>. Historically,
+this has been the only type of Template available.
+
+Templates of type C<Simple> permit only simple variable interpolation.
+No special privilege beyond C<ModifyTemplate> is needed to write C<Simple>
+templates.
+
+For both types of templates, text between curly braces C<{ ... }> is
+interpolated. For C<Perl> templates, this text can be any code (see
+L<Text::Template/Details>). For C<Simple> templates, only simple variables
+are permitted; for example C<{ $TicketSubject }>.
+
+=head3 Selected Simple Template variables
+
+=over 4
+
+=item $TicketId
+
+=item $TicketSubject
+
+=item $TicketStatus
+
+=item $TicketQueueName
+
+=item $TicketOwnerName
+
+=item $TicketOwnerEmailAddress
+
+=item $TicketCF(Name)
+
+For example, C<$TicketCFDepartment>.
+
+=item $TransactionType
+
+=item $TransactionField
+
+=item $TransactionOldValue
+
+=item $TransactionNewValue
+
+=item $TransactionData
+
+=item $TransactionContent
+
+=item $TransactionDescription
+
+=item $TransactionBriefDescription
+
+=item $TransactionCF(Name)
+
+For example, C<$TransactionCFLocation>.
+
 =cut
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list