plainblack.com
Username Password
search
Bookmark and Share
Subscribe

Using Macros

WebGUI macros are used to create dynamic content within otherwise static content. For instance, you may wish to show which user is logged in on every page, or you may wish to have a dynamically built menu or crumb trail.

Macros always begin with a caret (^) and follow with at least one other character and end with a semicolon (;). Some macros can be extended/configured by taking the format of ^x("config text");. When providing multiple arguments to a macro, they should be separated by only commas:
^x("First argument",2);

If you put spaces before or after your commas, WebGUI will not parse your arguments correctly.

You may nest Macros, but only if they do not contains commas or quotes. You should follow the following guidelines:

  • Macros which contain HTML or javascript cannot be nested.
  • Macros which return user input that may contain quotes or commas may be nested, but it's dangerous.
  • If your user input must contain quotes and/or commas, it is recommended that the HTML encodings for comma and quote be used.

Keywords: macro

Search | Most Popular | Recent Changes | Wiki Home
© 2018 Plain Black Corporation | All Rights Reserved