## Please edit system and help pages ONLY in the master wiki! ## For more information, please see MoinMoin:MoinDev/Translation. ##master-page:Unknown-Page ##master-date:Unknown-Date #acl -All:write Default #format wiki #language en = Variables = <> This page tells you more how you can use variables in wiki pages. This is especially helpful within [[HelpOnTemplates|templates]], but also on "normal" wiki pages (like for signing a contribution). == Predefined Variables == The following variables are substituted when a page is saved. '''''Note that they will appear unreplaced in the preview!''''' || '''Variable''' || '''Description''' || '''Example – markup''' || '''Example – render''' || || @``PAGE@ || Name of the page (useful for template pages) || `HelpOnPageCreation` || HelpOnPageCreation || || @``TIMESTAMP@ || Raw time stamp || `2004-08-30T06:38:05Z` || 2004-08-30T06:38:05Z || || @``DATE@ || Current date in the system's format || `<>` || <> || || @``TIME@ || Current date and time in the user's format || `<>` || <> || || @``ME@ || Just the user's name || `TheAnarcat` || TheAnarcat || || @``USERNAME@ || Just the user's name (or his domain/IP) || `TheAnarcat` || `TheAnarcat` || || @``USER@ || Signature "-- loginname" || `-- TheAnarcat` || -- TheAnarcat || || @``SIG@ || Dated Signature "-- loginname date time" || `-- TheAnarcat <>` || -- TheAnarcat <> || || @``EMAIL@ || Replaced with `<>` macro with editor's obfuscated email address ||`<> or <
> testuser AT example DOT com || || @``MAILTO@ || Replaced with `<>` macro with editor's email address||`<> <> <> }}} 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.