Content-type: text/html Define Tag

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


Define Tag
You can define most any token for use in your HTML or Agent code. When the Compiler finds a string of text that matches the token, it substitues the literal text you have defined. Any embedded tokens in the text are expanded at the time of defintion.

Examples
<define replace_this with this, this and that>

<define (c) &copy;>

<define %product%>
<font size=-1>MySoftware(tm)</font>
</define>


<define %copyright% %product% is Copyright(c)1998 MyCompany.>

Syntax
This tag can be a single or tag pair combination. Like other token-related Compiler tags, define departs from the pure HTML attribute model. Token names must not contain spaces and should be less than 64 characters in length. The text you define for a token is a literal and should not include quotes unless you want them literally in the definition.

Naming
We recommend you pick some form of delimiter to denote tokens in your code. This prevents unexpected replacements. All of the following would be easy to spot:

%mytoken%
:token:
@token.member
%token.member%


Caution
Tokens can be any text. Therefore, you should not create a token for important things like "<" unless you want a disaster on your hands.

See Also
Compiler Tokens
Ifdef Tag
Ifnot Tag
Replace Tag
Undef Tag

Up To
Compiler Tags
Complete Tag Reference


WebGroove® is a registered trademark of Creativision Publishing Corporation