Skip to topic
|
Skip to bottom
Jump:
TWiki
PyqPlayer
Download
Documentation
FAQs
Welcome
Register
TWiki Web
TWiki Web Home
Changes
Topics
Index
Search
Other TWiki Webs
Main
Sandbox
TWiki
Create
personal sidebar
Edit
Attach
Printable
TWiki.TWikiVariables
r1.78 - 14 Aug 2004 - 07:55 -
PeterThoeny
topic end
Start of topic |
Skip to actions
%TOC% %STARTINCLUDE% ---# TWiki Variables _Special text strings expand on the fly to display user data or system info_ <nop>TWikiVariables are text strings - =%<nop>VARIABLE%= - that expand into content whenever a page is rendered for viewing. =VARIABLES= are replaced by data, either user-entered or automatically generated by TWiki (like the date, or the current username). There are predefined variables, and Preference variables that you can configure. You can also define custom variables, with new names and values. __Notes:__ * To leave a variable unexpanded, precede it with an exclamation point, e.g. type =!%<nop>TOPIC%= to get !%TOPIC%. * Variables are expanded relative to the topic they are _used_ in, not the topic they are _defined_ in. ---++ Predefined Variables Most predefined variables return values that were either set in the ==lib/twiki.cfg== file, when TWiki was installed, or taken from server info (like current username, or date and time). Many of the variables let you format the appearance of the display results. * %T% *Take the time to thoroughly read through ALL preference variables.* If you actively configure your site, review variables periodically. They cover a wide range of functions, and it can be easy to miss the one perfect variable for something you have in mind. For example, see ==%<nop>INCLUDINGTOPIC%==, ==%<nop>INCLUDE%==, and the mighty ==%<nop>SEARCH%==. This version of TWiki - %WIKIVERSION% - expands the following variables (enclosed in ==%== percent signs): %INCLUDE{"TWikiVariablesAtoM"}% %INCLUDE{"TWikiVariablesNtoZ"}% __Note:__ Above text is included from TWikiVariablesAtoM and TWikiVariablesNtoZ #PreferencesVariables ---++ Preferences Variables Additional variables are defined in the preferences topics: * site-level ( __SL__ ) in %TWIKIWEB%.%WIKIPREFSTOPIC% * web-level ( __WL__ ) in %WEBPREFSTOPIC% of each web * user level ( __UL__ ) in individual user topics <table cellspacing="0" cellpadding="2" border="1" align="center" style="background-color:#f5f5f5"> <tr> <th width="160"> Variable: </th><th> Level: </th><th> What: </th><th>Expands to:</th> </tr> <tr> <td> =%<nop>ALLOWTOPICCHANGE%= </td> <td> __(any topic)__ </td> <td> List of users and groups who are *allowed* to change the current topic. (More in TWikiAccessControl) </td> <td> %ALLOWTOPICCHANGE% </td> </tr> <tr> <td> =%<nop>ALLOWTOPICRENAME%= </td> <td> __(any topic)__ </td> <td> List of users and groups who are *allowed* to rename the current topic. (More in TWikiAccessControl) </td> <td> %ALLOWTOPICRENAME% </td> </tr> <tr> <td> =%<nop>ALLOWWEBCHANGE%= </td> <td> __WL__ </td> <td> List of users and groups who are *allowed* to change topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl) </td> <td> %ALLOWWEBCHANGE% </td> </tr> <tr> <td> =%<nop>ALLOWWEBRENAME%= </td> <td> __WL__ </td> <td> List of users and groups who are *allowed* to rename topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl) </td> <td> %ALLOWWEBRENAME% </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> <td> %ATTACHLINKBOX% </td> </tr> <tr> <td> =%<nop>DENYTOPICCHANGE%= </td> <td> __(any topic)__ </td> <td> List of users and groups who are *not allowed* to change the current topic. (More in TWikiAccessControl) </td> <td> %DENYTOPICCHANGE% </td> </tr> <tr> <td> =%<nop>DENYTOPICRENAME%= </td> <td> __(any topic)__ </td> <td> List of users and groups who are *not allowed* to rename the current topic. (More in TWikiAccessControl) </td> <td> %DENYTOPICRENAME% </td> </tr> <tr> <td> =%<nop>DENYWEBCHANGE%= </td> <td> __WL__ </td> <td> List of users and groups who are *not allowed* to change topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl) </td> <td> %DENYWEBCHANGE% </td> </tr> <tr> <td> =%<nop>DENYWEBRENAME%= </td> <td> __WL__ </td> <td> List of users and groups who are *not allowed* to rename topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl) </td> <td> %DENYWEBRENAME% </td> </tr> <tr> <td> =%<nop>DONTNOTIFYCHECKBOX%= </td> <td> __SL__ , __UL__ </td> <td> Default state of the "Minor Changes, Don't Notify" (DontNotify) check box in preview. Check box is initially checked if =Set DONTNOTIFYCHECKBOX = checked="checked"=, or unchecked if empty. Value is: <b><code>%DONTNOTIFYCHECKBOX%</code></b> </td> <td> %DONTNOTIFYCHECKBOX% </td> </tr> <tr> <td> =%<nop>EDITBOXHEIGHT%= </td> <td> __SL__ , __UL__ </td> <td> Vertical size of edit box, is <b> =%EDITBOXHEIGHT%= </b> </td> <td> %EDITBOXHEIGHT% </td> </tr> <tr> <td> =%<nop>EDITBOXWIDTH%= </td> <td> __SL__ , __UL__ </td> <td> Horizontal size of edit box, is <b> =%EDITBOXWIDTH%= </b> </td> <td> %EDITBOXWIDTH% </td> </tr> <tr> <td> =%<nop>EDITBOXSTYLE%= </td> <td> __SL__ , __UL__ </td> <td> Style of text edit box. Set to =width: 99%= for full window width (default; overwrites the EDITBOXWIDTH setting), or =width: auto= to disable. Value is: <b><code>%EDITBOXSTYLE%</code></b> </td> <td> %EDITBOXSTYLE% </td> </tr> <tr> <td> =%<nop>FINALPREFERENCES%= </td> <td> __SL__ , __WL__ </td> <td> List of preferences that are not allowed to be overridden by next level preferences</td> <td> %FINALPREFERENCES% </td> </tr> <tr> <td> =%<nop>HTTP_EQUIV_ON_EDIT%= </td> <td> __SL__ , __UL__ </td> <td> http-equiv meta tags for edit script. </td> <td> %HTTP_EQUIV_ON_EDIT% </td> </tr> <tr> <td> =%<nop>HTTP_EQUIV_ON_PREVIEW%= </td> <td> __SL__ , __UL__ </td> <td> http-equiv meta tags for preview script. </td> <td> %HTTP_EQUIV_ON_PREVIEW% </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> <td> %HTTP_EQUIV_ON_VIEW% </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> <td> %NEWTOPICBGCOLOR% </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> <td> %NEWTOPICFONTCOLOR% </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> <td> %NOSEARCHALL% </td> </tr> <tr> <td> =%<nop>RELEASEEDITLOCKCHECKBOX%= </td> <td> __SL__ , __UL__ </td> <td> Default state of the "Release edit lock" (UnlockTopic) check box in preview. Checkbox is initially checked if =Set RELEASEEDITLOCKCHECKBOX = checked="checked"=, or unchecked if empty. If checked, make sure to click on <u>Edit</u> to do more changes; do *not* go back in your browser to the edit page, or you risk that someone else will edit the topic at the same time! Value is: <b><code>%RELEASEEDITLOCKCHECKBOX%</code></b> </td> <td> %RELEASEEDITLOCKCHECKBOX% </td> </tr> <tr> <td> =%<nop>WEBBGCOLOR%= </td> <td> __WL__ </td> <td> Background color of web </td> <td> %WEBBGCOLOR% </td> </tr> <tr> <td> =%<nop>WEBCOPYRIGHT%= </td> <td> __SL__ , __WL__ </td> <td> Copyright notice (bottom right corner of topics) </td> <td> %WEBCOPYRIGHT% </td> </tr> <tr> <td> =%<nop>WEBTOPICLIST%= </td> <td> __WL__ </td> <td> Common links of web (second line of topics) </td> <td> %WEBTOPICLIST% </td> </tr> <tr> <td> =%<nop>WIKIWEBLIST%= </td> <td> __SL__ </td> <td> List of %WIKITOOLNAME% webs (in upper right corner of topics) </td> <td> %WIKIWEBLIST% </td> </tr> <tr> <td> =%<nop>WIKIWEBMASTER%= </td> <td> __SL__ </td> <td> Webmaster email address (sender of email notifications) , is <b>%WIKIWEBMASTER%</b> </td> <td> %WIKIWEBMASTER% </td> </tr> </table> __Note:__ There are some more useful variables defined in the TWikiPreferences like =%<nop>BR%= for line break, colors like =%<nop>RED%= for colored text and small icons like =%<nop>H%= for a %H% Help icon. #SettingPrefs ---++ Setting Preferences * The syntax for Preferences Variables is the same anywhere in TWiki (on its own TWiki bullet line, including nested bullets): <br />[multiple of 3 spaces] * [space] Set [space] VARIABLENAME [space] = [value]<br /> __Examples:__ * ==<nop>Set VARIABLENAME = value== * ==<nop>Set VARIABLENAME = value== ---++ Creating Custom Variables * You can add your own Preference Variables for us across an entire site or a single web, using the standard [[#SettingPrefs][Preferences syntax]]. Whatever you include in your Variable will be expanded on display, exactly as if it had been entered directly. You can place formatted text, page links, image paths. <blockquote style="background-color:#ffffff"> *Example: Create a custom logo variable the <nop>%WEB% web* <br /> * To place a logo anywhere in a web by typing ==%<nop>MYLOGO%==, define the Variable on the web's WebPreferences page, and upload a logo file, ex: =mylogo.gif=. You can upload by [[FileAttachment][attaching the file]] to WebPreferences, or, to avoid clutter, to any other topic in the same web, ex: =LogoTopic=: * ==<nop>Set MYLOGO = %<nop>PUBURL%/<nop>TWiki/LogoTopic/mylogo.gif== </blockquote> -- TWiki:Main.PeterThoeny - 14 Aug 2004 <br /> -- TWiki:Main.MikeMannix - 12 May 2002 %STOPINCLUDE% Crawford split up this topic into included TWikiVariablesAtoM and TWikiVariablesNtoZ. -- Main.PeterThoeny - 26 Jul 2004
to top
End of topic
Skip to action links
|
Back to top
Edit
|
Attach image or document
|
Printable version
|
Raw text
|
More topic actions
Revisions: | r1.78 |
>
|
r1.77
|
>
|
r1.76
|
Total page history
|
Backlinks
You are here:
TWiki
>
TWikiVariables
to top
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Project hosting provided by:
Donations welcome: