PodWiki Variables
Internal Variables
Predefined Variables
User-Defined Variables
Global Variables
RCS Variables
PodWiki has build-in variable support. You can insert variables anywhere in your page. PodWiki automatically interpolates it to its textual representation.
A variable must begin with the dollar character.
Note: If you want to use the DOLLAR character in a Pod page, prepend it with a backslash: \$.
There are some different types of variables:
Those variables are maintained by the PodWiki program itself (in fact: PodWiki::Runner). Here is the list of internal available variables:
the scriptname of PodWiki, usefull for building uri's.
the name of the current PodWikiPage.
PodWiki includes a module PodWiki::Vars which pre-defines some variable-sets.
Small Graphics Set:
$ascii
$attach
$back
$bookmark
$cancel
$cdimage
$configure
$contents
$document
$down
$edit
$encrypted
$filefind
$fileopen
$fileprint
$filesave
$forward
$gohome
$help
$html
$idea
$image
$info
$lock
$ok
$pdf
$sound
$tar
$tgz
$up
$video
Color Variables
You can use these variables to create colored text.
The following foreground color variables are defined:
$YELLOW, $ORANGE, $RED, $PINK, $PURPLE, $TEAL, $NAVY, $BLUE, $AQUA, $LIME, $GREEN, $OLIVE, $MAROON, $BLACK, $GRAY $SILVER, $WHITE, $END.
$END is a special variable, it resets the color to the default color.
Example:
$RED red text $END
red text
You can use the same colors for background too, just prepend the variable name with a B_, e.g. $B_AQUA. You can intermix foreground and background colors, this way you can create any combination of colored text.
Example:
$GREEN $B_AQUA green on aqua text $END $B_END
green on aqua text
The user can define any nymuber of variables in a =begin options block. Any valid configuration statement can be used inside the page as variable. Eg:
=begin options hr = <hr size="1"> width = 100% =end options
This defines two config options: hr and width. PodWiki will ignore there options, but they are available for interpolation in the page as $hr and $width.
Additional variables can be defined by the administrator (root)
of PodWiki via the
Site Admin page. Just add a variable name
and then add a value for this variable. The editor of a page can
use such variables using the same dollar notation as for predefined
variables.
There are some special keywords which are used by the RCS
version control system and will be automatically substituted
when a page gets checked in. Take a look at the
PodWiki RCS documentation
for more details.