Find file
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (56 sloc) 1.81 KB
__NAME__ purpose
define an Interchange variable
__END__
__NAME__ see also
VariableDatabase, var
__END__
__NAME__ synopsis
<arg choice='plain'><replaceable>NAME</replaceable></arg>
<arg choice='plain'><replaceable>value</replaceable></arg>
__END__
__NAME__ description
The directive defines a variable that will be available either
globally (if defined in &gcf;) or within a catalog (if defined in &ccf;).
</para><para>
Variable names are case sensitive and can only contain word characters
(that is, a-z, A-Z, 0-9 and _).
</para><para>
Once the variable is defined, it can be accessed using the following
syntax:
<itemizedlist>
<listitem><para>
<literal>__<replaceable>NAME</replaceable>__</literal>
- to only look for a catalog variable
</para></listitem>
<listitem><para>
<literal>@@<replaceable>NAME</replaceable>@@</literal>
- to only look for a global variable
</para></listitem>
<listitem><para>
<literal>@_<replaceable>NAME</replaceable>_@</literal>
- to first look for a catalog variable, falling back to global
unless found
</para></listitem>
<listitem><para>
Using the &tag-var; tag (Note: the &tag-var; tag is parsed together with
all other tags, unlike the previous methods which are parsed separately,
before &glos-ITL; tag processing takes place)
</para></listitem>
</itemizedlist>
__END__
__NAME__ notes
Variable names <emphasis role='bold'>do not</emphasis> need to begin
with a capital letter (unlike the documentation prior to
&IC; &first-xmldocs-release; release stated), even though specifying
them in all-uppercase is a widely accepted practice.
__END__
__NAME__ example: Defining a variable
<programlisting>
Variable EMAIL root@&def-domain;
</programlisting>
__END__
__NAME__ example: Defining a variable
<programlisting>
Variable DOCUMENT_ROOT /usr/local/etc/httpd/htdocs
</programlisting>
__END__