| Placeholder Modifiers
Placeholders are used to insert information into templates. Sometimes, this information can contain some characters which you'd like to have protected, so they aren't interpretted as special codes; for instance, you'd want to protect a category name inside of an <input value=""> tag, where the category's name may contain a " character, which would otherwise break the tag.
By placing an underscore and one of these placeholder modifiers after your placeholder, you can affect how the placeholder is formatted when being outputted by the program.
HTML Encoding
The $_he$ modifier will escape HTML characters, so they won't be parsed as tags. The characters <, >, &, and " are all replaced by < > & and " respectively.
This can be useful if you want to prevent fields from having HTML in them, or if you want to use a placeholder inside of an <input value=""> tag; a " character in the output would otherwise break the tag.
Examples:
Summary: $summary_he$
Summary: Today was a <blink>great</blink> day at the office
<input name="user" value="$name_he$">
<input name="user" value="Joe "Steel" Knight">
URL Encoding
Sometimes, you'll want to use a placeholder as part of an URL. To prevent characters from breaking any surrounding code or tags, and to ensure that all browsers can correctly interpret the link.
Note: You won't want to URL encode entire URLs, only values you want to pass in an URL. For example, a / character as a directory separator should not be URL encoded.
Example:
<a href="$_cgisearchurl$?search=$name_ue$">
<a href="http://www.yoursite.com/cgi-bin/se/exec/search.cgi?search=Joe%20%22Steel%22%20Knight">
Non-Breaking Space Encoding
If you want the information that will be inserted in your template not to word-wrap, you can use this modifier to convert spaces to special HTML entities which will prevent word-wrapping.
Example:
Title: $title_nbsp$
Title: This text looks normal, but it will not wrap
|