PortWeb's Macro Language
Manual: v5 - pages 279-291, v6 - PortWeb manual pages 27-35
PortWeb provides a macro method to write data from any built-in or custom fields as well as some data calculated by PortWeb into your PortWeb templates.
- All PortWeb macros are enclosed by percentage signs, e.g. %totalitems%.
- Any field value can be displayed simply by enclosing the field's name in percent signs. This includes both built-in fields (%Description%) and custom fields (%myInteger%). Note special extra notation may be required for multivalue fields as described on page 280 of the manual.
- Macros are not case sensitive but spaces in macros such as field names, e.g. 'Extension Win', must be kept - %Extension Win%. Some users have reported errors when using Field names in macros where the original case is not maintained. For this reason, you are advised to maintain the source name's case when calling Field name macros, e.g. %Extension Win% and not %extension win%.
- If you use HTML attributes such as percentage widths, e.g. <td width=45%>, in a template you must 'escape' the single percent sign with another one to stop PortWeb misinterpreting it as the start of a macro, e.g. <td width=45%%> (see manual page 289)
In v5, see the listings on pages 279, 280, and 282 of the manual or the client's online Help section 'Templates and Macros'. Note the manual listing page 280, incorrectly lists %fieldname^x% instead of %fieldname%^x as shown correctly in the accompanying code sample.
In v6, see the (separate) PortWeb Manual PDF the section on pages 27 to 35 covers macros in some detail.
Question: PortWeb's Macro Language [FAQ00223.htm]
Last Update:- 31 May 2006