Dell Powerconnect W-ClearPass Virtual Appliances W-ClearPass Guest 6.0 Deploym - Page 266
Modifiers, Predefined Template Functions, dump, Table 26
View all Dell Powerconnect W-ClearPass Virtual Appliances manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 266 highlights
The content after a {foreachelse} tag is included only if the {foreach} block would otherwise be empty. Modifiers Smarty provides modifiers that can be used to gain greater control over the formatting of data. Modifiers can be included by following a variable with a vertical bar | and the name of the modifier. Any arguments to the modifier can be specified using a colon : followed by the arguments. The following example prints a date using the YYYY-MM-DD syntax: {$expire_time|nwadateformat:"%Y-%m-%d"} See"Date/Time Format Syntax" on page 279 for detailed information on the date/time format modifiers, and see Table 26. Table 26: Smarty Modifiers Modifier Description htmlspecialchars Escapes characters used in HTML syntax with the equivalent HTML entities (& for &, < for < and > for >) nl2br Replaces newline characters in the value with HTML line breaks () number_format Formats a numerical value for display; an optional modifier argument may be used to specify the number of decimal places to display (default is 0) nwadateformat Date/time formatting; see"nwadateformat Modifier" on page 279 for details about this modifier function nwatimeformat Date/time formatting; see"Date/Time Format String Reference " on page 281 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" on page 284 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 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} 266 | Modifiers Dell Networking W-ClearPass Guest 6.0 | Deployment Guide