The following 173 words could not be found in the dictionary of 615 words (including 615 LocalSpellingWords) and are highlighted below:

about   above   accessed   actual   Anarcat   and   anywhere   appear   appropriate   areas   assignment   At   be   better   cached   can   comments   course   Creation   Current   Date   date   Dated   Description   dict   Dict   displays   does   domain   each   edit   editing   ending   etc   Every   Example   example   excluded   expand   expanding   expansion   fancy   fetched   file   following   For   for   format   from   get   Get   getting   global   happens   Help   his   Home   If   important   in   In   including   information   instead   instructions   just   Just   leading   link   loaded   loginname   long   macro   Mail   mailto   make   memory   might   more   must   My   name   Name   None   Note   of   On   on   once   opening   or   Other   other   page   Page   pages   parsing   pickle   predefined   preview   process   processing   public   put   R1   R2   Refresh   regex   Renders   replaced   require   running   saved   saving   Saving   see   See   set   Signature   sites   some   space   special   specific   substituted   substitution   system   T06   template   Templates   templates   than   that   The   the   then   there   these   they   think   those   Time   time   to   To   unreplaced   use   useful   User   user   using   Val   value   value1   value2   value3   values   var1   var2   var3   variable   Variable   variables   Variables   very   When   when   will   window   with   You   you   your  

Clear message

Help on Variables

predefined variables

The following variables are substituted when a page is saved. Note that they will appear unreplaced in the preview!

Variable

Description

Example

@PAGE@

Name of the page (useful for template pages)

HelpOnPageCreation

@DATE@

Current date in the system's format

2004-08-30

@TIME@

Current date and time in the user's format

2004-08-30 06:38:05

@USERNAME@

Just the user's name (or his domain/IP)

TheAnarcat

@USER@

Signature "-- loginname"

-- TheAnarcat

@SIG@

Dated Signature "-- loginname date time"

-- TheAnarcat 2004-08-30 06:38:05

@MAILTO@

A fancy mailto: link with the user's data

None - on public sites, better use the MailTo macro)

expanding variables

You can use HomePageName/MyDict to expand those variables, just put a WikiDict there with your variables and values. For example,

 VAR1:: substitution 1
 VAR2:: substitution 2

If you make a page ending with .*Dict (see page_dict_regex), you can set some variables to specific values:

var1
value1
var2
value2
var3
value3

The actual format of the variable assignment above when editing in the edit window is the following:

 var1:: value1
 var2:: value2
 var3:: value3

The leading space and the space after '::' are important.

getting variables

At Every Page Refresh

You can use these values using the GetVal macro:

[[GetVal(WikiDict,var1)]] [[GetVal(WikiDict,var2)]] [[GetVal(WikiDict,var3)]]

Renders as:

When Saving the Page

If the variables are set on UserName/MyDict (UserName must of course be replaced as appropriate), you can get the variables when saving any page with @var1@, @var2@, ...etc. instead of the GetVal macro.


/!\ Note that data in dict pages is cached and does not require opening and parsing the page file for each access to the value. In CGI, the value is fetched from a pickle, in long running process, the pickle is loaded once and then the value is accessed from memory.

/!\ Note that saving template pages and using preview does not expand variables. Other than that, variable expansion is very global and happens anywhere on the page, including code displays, comments, processing instructions and other "special" areas of a page you might think are excluded. See HelpOnTemplates for more information about using templates.

HelpOnVariables (last modified 2007-01-22 09:11:30)