TWiki expands the following variables enclosed in % percent signs: <table border="1"><tr> <th> Variable: </th><th> Expanded to: </th> </tr><tr> <td> =%<nop>WIKIHOMEURL%= </td> <td> The base script URL of TWiki, link of Home icon in upper left corner, is <b>%WIKIHOMEURL%</b> </td> </tr><tr> <td> =%<nop>SCRIPTURL%= </td> <td> The script URL of TWiki, is <b>%SCRIPTURL%</b></td> </tr><tr> <td> =%<nop>SCRIPTURLPATH%= </td> <td> The path of the script URL of TWiki, is <b>%SCRIPTURLPATH%</b></td> </tr><tr> <td> =%<nop>PUBURL%= </td> <td> The public URL of TWiki, is <b>%PUBURL%</b> </td> </tr><tr> <td> =%<nop>PUBURLPATH%= </td> <td> The path of the public URL of TWiki, is <b>%PUBURLPATH%</b> </td> </tr><tr> <td> =%<nop>ATTACHURL%= </td> <td> The attachment URL of the current topic, is <b>%ATTACHURL%</b> <br> Example: If you attach a file you can refer to it as =<b>%<nop>ATTACHURL%/image.gif</b>= </td> </tr><tr> <td> =%<nop>ATTACHURLPATH%= </td> <td> The path of the attachment URL of the current topic, is <b>%ATTACHURLPATH%</b> </td> </tr><tr> <td> =%<nop>WIKITOOLNAME%= </td> <td> Name of wiki tool, is <b>%WIKITOOLNAME%</b> </td> </tr><tr> <td> =%<nop>WIKIVERSION%= </td> <td> Wiki tool version, is <b>%WIKIVERSION%</b> </td> </tr><tr> <td> =%<nop>USERNAME%= </td> <td> Your login username, is <b>%USERNAME%</b> </td> </tr><tr> <td> =%<nop>WIKIUSERNAME%= </td> <td> Your Wiki username, if defined in %MAINWEB%.TWikiUsers. Same as %<nop>USERNAME% if not defined. Is <b>%WIKIUSERNAME%</b> </td> </tr><tr> <td> =%<nop>WEB%= </td> <td> The current web, is <b>%WEB%</b> </td> </tr><tr> <td> =%<nop>TOPIC%= </td> <td> The current topic name, is <b>%TOPIC%</b> </td> </tr><tr> <td> =%<nop>GMTIME%= </td> <td> GM time, is <b>%GMTIME%</b> </td> </tr><tr> <td> =%<nop>GMTIME{"format"}%= </td> <td> Formatted GM time based on keywords (first three characters needed.) <br> Example: =%<nop>GMTIME{"day month, year - hour:min:sec"}%= is <b>%GMTIME{"day month, year - hour:min:sec"}%</b> </td> </tr><tr> <td> =%<nop>SERVERTIME%= </td> <td> Server time, is <b>%SERVERTIME%</b> </td> </tr><tr> <td> =%<nop>SERVERTIME{"format"}%= </td> <td> Formatted server time. Example: =%<nop>SERVERTIME{"hou:min"}%= is <b>%SERVERTIME{"hou:min"}%</b> </td> </tr><tr> <td> =%<nop>HTTP_HOST%= </td> <td> HTTP_HOST environment variable, is <b>%HTTP_HOST%</b> </td> </tr><tr> <td> =%<nop>REMOTE_ADDR%= </td> <td> REMOTE_ADDR environment variable, is <b>%REMOTE_ADDR%</b> </td> </tr><tr> <td> =%<nop>REMOTE_PORT%= </td> <td> REMOTE_PORT environment variable, is <b>%REMOTE_PORT%</b> </td> </tr><tr> <td> =%<nop>REMOTE_USER%= </td> <td> REMOTE_USER environment variable, is <b>%REMOTE_USER%</b> </td> </tr><tr> <td> =%<nop>INCLUDE{"file.ext"}%= </td> <td> Server side include, includes the text of a file. The default directory is the current Wiki web. Example: =<b>%<nop>INCLUDE{"../Know/TopicName.txt"}%</b>= </td> </tr><tr> <td> =%<nop>SEARCH{"str" ...}%= </td> <td> Inline search, shows a search result embedded in a topic. Parameter is composed of the search string, followed by optional =name="value"= pairs: | *Pair:* | *Description:* | *Default:* | | =web="Name"= | Specify Wiki web to search | Current web | | =scope="topic"= | Search topic name (title) | Topic text (body) | | =regex="on"= | RegularExpression search | Literal search | | =casesensitive="on"= | Case sensitive search | Ignore case | | =nosummary="on"= | Show topic title only | Show topic summary | | =nosearch="on"= | Suppress search string | Show search string | | =nototal="on"= | Do not show number of topics found | Show number | Example: =<b>%<nop>SEARCH{"wiki" web="Main" scope="topic"}%</b>= </td> </tr></table> Additional variables are defined in the preferences ( site-level ( __SL__ ) in %TWIKIWEB%.%WIKIPREFSTOPIC%, web-level ( __WL__ ) in %WEBPREFSTOPIC% of each web, and user level ( __UL__ ) preferences in individual user topics): <table border="1"><tr> <th> Variable: </th><th> Level: </th><th> What: </th> </tr><tr> <td> =%<nop>WIKIWEBMASTER%= </td> <td> __SL__ </td> <td> Webmaster email address (sender of email notifications) , is <b>%WIKIWEBMASTER%</b> </td> </tr><tr> <td> =%<nop>WIKIWEBLIST%= </td> <td> __SL__ </td> <td> List of %WIKITOOLNAME% webs (in upper right corner of topics) </td> </tr><tr> <td> =%<nop>WEBTOPICLIST%= </td> <td> __WL__ </td> <td> Common links of web (second line of topics) </td> </tr><tr> <td> =%<nop>WEBCOPYRIGHT%= </td> <td> __SL__ , __WL__ </td> <td> Copyright notice (bottom right corner of topics) </td> </tr><tr> <td> =%<nop>WEBBGCOLOR%= </td> <td> __WL__ </td> <td> Background color of web </td> </tr><tr> <td> =%<nop>EDITBOXWIDTH%= </td> <td> __SL__ , __UL__ </td> <td> Horizontal size of edit box, is <b> =%EDITBOXWIDTH%= </b> </td> </tr><tr> <td> =%<nop>EDITBOXHEIGHT%= </td> <td> __SL__ , __UL__ </td> <td> Vertical size of edit box, is <b> =%EDITBOXHEIGHT%= </b> </td> </tr><tr> <td> =%<nop>ATTACHLINKBOX%= </td> <td> __SL__ , __UL__ </td> <td> Default state of the link check box in the attach file page. Check box is initially checked if value is set to =CHECKED= , unchecked if empty. If checked, a link is created to the attached file at the end of the topic. Value is: <b><code>%ATTACHLINKBOX%</code></b> </td> </tr></table> -- Main.PeterThoeny - 29 May 2000 <br>
This topic: TWiki
>
TWikiVariables
Topic revision: r8 - 28 Jul 2000 - PeterThoeny
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding The Caboteria?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.TWikiVariables
.