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>SPACEDTOPIC%= </td> <td> The current topic name with added spaces, for regular expression search of Ref-By, is <b>%SPACEDTOPIC%</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{"SomeTopic"}%= </td> <td> Server side include, includes another topic. The current Wiki web is searched by default. Example: =<b>%<nop>INCLUDE{"TWiki.TWikiWebsTable"}%</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"= <br> =web="Main Know"= <br> =web="all"= | Wiki web to search: A web, a list of webs separated by whitespace, or all webs =[1]= | Current web | | =scope="topic"= <br> =scope="text"= | Search topic name (title) or in the text (body) of the topic | Topic text (body) | | =order="topic"= <br> =order="modified"= <br> =order="editby"= | Sort the results of search by the topic names, last modified time, or last editor | Sort by topic name | | =limit="all"= <br> =limit="16"= | Limit the number of results returned | All results | | =regex="on"= | RegularExpression search | Literal search | | =reverse="on"= | Reverse the direction of the search | Ascending search | | =casesensitive="on"= | Case sensitive search | Ignore case | | =nosummary="on"= | Show topic title only | Show topic summary | | =bookview="on"= | BookView search, e.g. show complete topic text | 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> [1] __Note__: A web can be excluded from a =web="all"= search if you define a =NOSEARCHALL=on= variable in its WebPreferences. 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>NOSEARCHALL%= </td> <td> __WL__ </td> <td> Exclude web from a =web="all"= search (set variable to =on= for hidden webs) </td> </tr><tr> <td> =%<nop>NEWTOPICBGCOLOR%= </td> <td> __SL__ , _UL_ </td> <td> Background color of non existing topic. ( __UL__ needs authentication for topic views ) </td> </tr><tr> <td> =%<nop>NEWTOPICFONTCOLOR%= </td> <td> __SL__ , _UL_ </td> <td> Font color of non existing topic. ( __UL__ needs authentication for topic views ) </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><tr> <td> =%<nop>HTTP_EQUIV_ON_VIEW%= </td> <td> __SL__ </td> <td> http-equiv meta tags for view, rdiff, attach, search* scripts. </td> </tr><tr> <td> =%<nop>HTTP_EQUIV_ON_EDIT%= </td> <td> __SL__ , __UL__ </td> <td> http-equiv meta tags for edit script. </td> </tr><tr> <td> =%<nop>HTTP_EQUIV_ON_PREVIEW%= </td> <td> __SL__ , __UL__ </td> <td> http-equiv meta tags for preview script. </td> </tr></table> -- Main.PeterThoeny - 18 Sep 2000 <br>
This topic: TWiki
>
TWikiVariables
Topic revision: r11 - 2000-09-19 - PeterThoeny
Copyright © 1999-2025 by the contributing authors. All material from TWiki is the property of the contributing authors.
Questions, comments, or concerns?
Contact GNHLUG
.
All use of this site subject to our
Legal Notice
(includes Terms of Service).