Template:Api/doc

Creates a link to a specific API function or event page with the appropriate label.


 * t
 * One of the following:
 * Global API function
 * CVar
 * Event
 * API Type
 * Widget (or UIObject)
 * Widget method (or )
 * Widget scripts (or handler)
 * XML element
 * Macro command
 * Other advanced combinations exist using  and   in certain ways... see the examples below.


 * First unnamed parameter
 * A properly formatted name such as UnitAura, or UIObject:GetName or PLAYER_LOGIN plus optionally the following:
 * For function/method arguments, arguments as
 * For widget scripts other than events, arguments as
 * For event payloads, payload as  with a colon at the start and space before each one
 * For XML attributes,  using a single space before each attribute and decimal after, and optionally specifying a value right after the decimal


 * Second unnamed parameter
 * Text to appear in lieu of the actual function/event/object name (but any parameters will still appear if they were defined)

Runtime API

 * Functions (a or default)
 * Truncates  from the title, colours arguments


 * Events (e)
 * Colours the payload


 * CVars (c)
 * Links to the CVar page


 * Widgets (o or o?)
 * Links to the UIOBJECT page


 * Widget methods (w or wm)
 * Truncates  from the title, reformats , colours arguments


 * Widget handlers (wh)
 * Links to the UIHANDLER page

XML elements

 * Start tag (x)
 * Wraps the tag with


 * End tag (/x)
 * Wraps the tag with


 * No children (x/)
 * Wraps the tag with

API Types

 * Basic types (t or t?)
 * Coloured orange, but not a hyperlink, and use t? to add optional/nilable question mark and tooltip
 * ,, , , etc.
 * ,, , , etc.


 * Complex types (t or t?)
 * Shortens the name for Constants, Enumerations and Structs, but otherwise makes an ordinary blue or red hyperlink to the page


 * Inline Complex Type (i and i?)
 * Alternate to a link, when an API type is defined 'inline' on the same page. (Such as an enum or struct used only by a single function.)


 * Optional/Nilable (t?, o? and i?)
 * Adds a customizable tooltip to indicate the parameter could be nil. Use nil= to customize the default message.  All instances of 'nil' will be shaded automatically in the tooltip.

Macros API

 * Macro command (m)
 * Turns a slash command into an appropriate link