446
| Reference
ClearPass Guest 3.9 | Deployment Guide
Predefined Template Functions
Template functions are used to perform different kinds of processing when the template is used. The result
of a template function takes the place of the function in the output of the template.
Functions are of two kinds:
block functions
, which have a beginning and ending tag enclosing the text
operated on by the function, and
template functions
, which have just a single tag and do not enclose text.
To use a function, enclose the function name in curly braces
{ }
and provide any attributes that may be
required for the function. Block functions also require a closing tag.
dump
{dump var=$value}
Smarty registered template function. Displays the value of a variable.
Use the following Smarty syntax to print a variable’s contents:
{dump var=$var_to_dump export=html}
The contents of the variable are printed in a
<pre>
block. Use the attribute “export=1” to use PHP’s
var_export()
format, or omit this attribute to get the default behavior – PHP’s
var_dump()
format.
Use the attribute “html=1” to escape any HTML special characters in the content. This can also be done
with attribute “export=html”, and is recommended for use in most situations (so that any embedded HTML
is not interpreted by the browser).
nwa_commandlink
{nwa_commandlink} … {/nwa_commandlink}
Smarty registered block function. Generates a “command link” consisting of an icon, main text and
explanatory text.
Command links are block elements and are roughly the equivalent of a form button. A command link is
typically used to represent a choice the user should make to proceed. The command link contains an icon,
command text (that sums up the action taken by the command link), and any explanatory text needed for
the command.
Usage example:
{nwa_commandlink icon="images" command="Command Link" linkwidth="400"
commandclass="nwaImportant" text="This is a sentence explaining the command."
textclass="nwaInfo"}link_here.php{/nwa_commandlink}
nwatimeformat
Date/time formatting; see
“Date/Time Format String Reference”
in this chapter for
details about this modifier function
nwamoneyformat
Formats a monetary amount for display purposes; an optional modifier argument may be
used to specify the format string. This modifier is equivalent to the NwaMoneyFormat()
function; see
“NwaMoneyFormat”
in this chapter for details.
strtolower
Converts the value to lowercase
strtoupper
Converts the value to uppercase
ucfirst
Converts the first character of the value to uppercase
ucwords
Converts the first character of each word in the value to uppercase
Table 40
Smarty Modifiers (Continued)
Modifier
Description
Summary of Contents for ClearPass Guest 3.9
Page 1: ...ClearPass Guest 3 9 Deployment Guide ...
Page 32: ...32 Management Overview ClearPass Guest 3 9 Deployment Guide ...
Page 178: ...178 RADIUS Services ClearPass Guest 3 9 Deployment Guide ...
Page 316: ...316 Guest Management ClearPass Guest 3 9 Deployment Guide ...
Page 410: ...410 Administrator Tasks ClearPass Guest 3 9 Deployment Guide ...
Page 414: ...414 Administrator Tasks ClearPass Guest 3 9 Deployment Guide ...
Page 423: ...ClearPass Guest 3 9 Deployment Guide Hotspot Manager 423 ...
Page 440: ...440 High Availability Services ClearPass Guest 3 9 Deployment Guide ...
Page 518: ...518 Index ClearPass Guest 3 9 Deployment Guide ...