
 |
 |
WebGroove is no longer supported. These docs are reference only. |
|

|

Compiler Tokens
A token is strictly a string of characters that the compiler replaces with another string of characters. If you are familiar with C/C++ you already know what they do. If not, think of token definitions as a sort of "search and replace".
 Tokens can be used for common phrases, page elements, handy shortcuts, etc. You define tokens with either the define or replace tags and can use single or paired tag syntax.
 Examples
<define %bgcolor% #ccffcc>
<define (c) ©>
<define [email] joe@cool.com>
<:replace [mailto] <a href=mailto:[email]>[email]</a>:>
 You can used the defined tokens at any point in your document and within other token definitions.
 Define vs. Replace
The thing to remember is that define expands tokens in the replacement text immediately, while replace expands imbedded tokens when you use a token. This means you can create toekns with replace that refer to tokens that aren't yet defined with no problem. Your ducks have to be in a row before you use them with define.
 Conventions
You don't have to use our naming conventions, but we recommend you be consistent across your site. We suggest the following general naming conventions to help distinguish tokens from text:
 //file_or_url_path/
%value_like_bgcolor%
%module.data_node%
 Macros and Tokens
Macro definitions and attributes can refer to tokens like anyhting else. When a macro is used, attribute values are placed in special tokens in the form of "{attribute}".
 See Also
 Define Tag
 Macro Tag
 Replace Tag
 Up To
 Compiler
 WebGroove® is a registered trademark of Creativision Publishing Corporation
|
 |
 |
 |
|

|