head 1.82; access; symbols; locks; strict; comment @# @; 1.82 date 2007.01.16.04.12.02; author TWikiContributor; state Exp; branches; next 1.81; 1.81 date 2006.10.25.00.21.59; author TWikiContributor; state Exp; branches; next 1.80; 1.80 date 2006.04.01.05.55.17; author TWikiContributor; state Exp; branches; next 1.79; 1.79 date 2006.02.01.12.01.20; author TWikiContributor; state Exp; branches; next 1.78; 1.78 date 2004.08.14.07.55.23; author PeterThoeny; state Exp; branches; next 1.77; 1.77 date 2004.05.09.07.41.10; author PeterThoeny; state Exp; branches; next 1.76; 1.76 date 2004.04.01.07.50.58; author PeterThoeny; state Exp; branches; next 1.75; 1.75 date 2004.03.17.06.31.00; author PeterThoeny; state Exp; branches; next 1.74; 1.74 date 2004.01.19.00.29.54; author PeterThoeny; state Exp; branches; next 1.73; 1.73 date 2004.01.18.09.11.57; author PeterThoeny; state Exp; branches; next 1.72; 1.72 date 2004.01.16.07.25.29; author PeterThoeny; state Exp; branches; next 1.71; 1.71 date 2004.01.10.07.25.51; author PeterThoeny; state Exp; branches; next 1.70; 1.70 date 2003.11.01.11.08.04; author PeterThoeny; state Exp; branches; next 1.69; 1.69 date 2003.09.29.00.28.27; author PeterThoeny; state Exp; branches; next 1.68; 1.68 date 2003.08.29.06.49.35; author PeterThoeny; state Exp; branches; next 1.67; 1.67 date 2003.08.23.07.51.41; author PeterThoeny; state Exp; branches; next 1.66; 1.66 date 2003.08.23.05.39.00; author PeterThoeny; state Exp; branches; next 1.65; 1.65 date 2003.06.30.23.40.04; author PeterThoeny; state Exp; branches; next 1.64; 1.64 date 2003.03.22.06.35.17; author PeterThoeny; state Exp; branches; next 1.63; 1.63 date 2003.02.09.00.46.08; author PeterThoeny; state Exp; branches; next 1.62; 1.62 date 2003.01.27.08.22.18; author PeterThoeny; state Exp; branches; next 1.61; 1.61 date 2003.01.19.08.21.09; author PeterThoeny; state Exp; branches; next 1.60; 1.60 date 2002.12.11.08.10.00; author PeterThoeny; state Exp; branches; next 1.59; 1.59 date 2002.11.23.04.42.00; author PeterThoeny; state Exp; branches; next 1.58; 1.58 date 2002.10.06.01.21.00; author PeterThoeny; state Exp; branches; next 1.57; 1.57 date 2002.08.25.07.18.17; author PeterThoeny; state Exp; branches; next 1.56; 1.56 date 2002.06.05.01.20.35; author PeterThoeny; state Exp; branches; next 1.55; 1.55 date 2002.05.24.16.04.04; author PeterThoeny; state Exp; branches; next 1.54; 1.54 date 2002.05.17.23.48.00; author PeterThoeny; state Exp; branches; next 1.53; 1.53 date 2002.05.15.06.59.32; author PeterThoeny; state Exp; branches; next 1.52; 1.52 date 2002.05.12.11.07.14; author MikeMannix; state Exp; branches; next 1.51; 1.51 date 2002.04.07.10.30.00; author PeterThoeny; state Exp; branches; next 1.50; 1.50 date 2002.03.08.03.52.00; author MikeMannix; state Exp; branches; next 1.49; 1.49 date 2002.02.16.10.37.10; author PeterThoeny; state Exp; branches; next 1.48; 1.48 date 2002.01.23.10.22.00; author MikeMannix; state Exp; branches; next 1.47; 1.47 date 2002.01.06.03.45.00; author MikeMannix; state Exp; branches; next 1.46; 1.46 date 2001.12.02.11.58.00; author MikeMannix; state Exp; branches; next 1.45; 1.45 date 2001.11.30.10.14.00; author MikeMannix; state Exp; branches; next 1.44; 1.44 date 2001.10.25.02.10.24; author PeterThoeny; state Exp; branches; next 1.43; 1.43 date 2001.09.15.09.52.20; author MikeMannix; state Exp; branches; next 1.42; 1.42 date 2001.09.14.06.07.40; author PeterThoeny; state Exp; branches; next 1.41; 1.41 date 2001.09.13.07.49.26; author JohnTalintyre; state Exp; branches; next 1.40; 1.40 date 2001.09.12.07.37.54; author MikeMannix; state Exp; branches; next 1.39; 1.39 date 2001.09.07.10.08.32; author MikeMannix; state Exp; branches; next 1.38; 1.38 date 2001.09.07.05.10.55; author MikeMannix; state Exp; branches; next 1.37; 1.37 date 2001.09.01.03.18.20; author MikeMannix; state Exp; branches; next 1.36; 1.36 date 2001.08.31.06.06.23; author MikeMannix; state Exp; branches; next 1.35; 1.35 date 2001.08.30.16.06.31; author MikeMannix; state Exp; branches; next 1.34; 1.34 date 2001.08.30.14.48.51; author MikeMannix; state Exp; branches; next 1.33; 1.33 date 2001.08.29.00.16.01; author MikeMannix; state Exp; branches; next 1.32; 1.32 date 2001.08.27.04.31.10; author MikeMannix; state Exp; branches; next 1.31; 1.31 date 2001.08.26.22.08.29; author MikeMannix; state Exp; branches; next 1.30; 1.30 date 2001.08.15.14.29.41; author PeterThoeny; state Exp; branches; next 1.29; 1.29 date 2001.08.07.15.11.42; author JohnTalintyre; state Exp; branches; next 1.28; 1.28 date 2001.07.23.07.30.52; author PeterThoeny; state Exp; branches; next 1.27; 1.27 date 2001.07.15.02.04.44; author PeterThoeny; state Exp; branches; next 1.26; 1.26 date 2001.07.11.16.56.50; author PeterThoeny; state Exp; branches; next 1.25; 1.25 date 2001.06.26.00.40.16; author PeterThoeny; state Exp; branches; next 1.24; 1.24 date 2001.06.08.01.59.58; author PeterThoeny; state Exp; branches; next 1.23; 1.23 date 2001.06.02.00.27.07; author PeterThoeny; state Exp; branches; next 1.22; 1.22 date 2001.03.25.07.32.59; author PeterThoeny; state Exp; branches; next 1.21; 1.21 date 2001.03.16.08.32.38; author PeterThoeny; state Exp; branches; next 1.20; 1.20 date 2001.03.02.02.05.13; author PeterThoeny; state Exp; branches; next 1.19; 1.19 date 2001.01.20.08.58.55; author PeterThoeny; state Exp; branches; next 1.18; 1.18 date 2001.01.20.02.25.23; author PeterThoeny; state Exp; branches; next 1.17; 1.17 date 2001.01.16.03.45.49; author PeterThoeny; state Exp; branches; next 1.16; 1.16 date 2000.12.18.21.14.46; author PeterThoeny; state Exp; branches; next 1.15; 1.15 date 2000.12.15.17.59.47; author PeterThoeny; state Exp; branches; next 1.14; 1.14 date 2000.12.14.02.40.48; author PeterThoeny; state Exp; branches; next 1.13; 1.13 date 2000.11.11.00.39.03; author PeterThoeny; state Exp; branches; next 1.12; 1.12 date 2000.11.02.06.41.55; author PeterThoeny; state Exp; branches; next 1.11; 1.11 date 2000.09.20.01.00.47; author PeterThoeny; state Exp; branches; next 1.10; 1.10 date 2000.09.19.07.19.18; author PeterThoeny; state Exp; branches; next 1.9; 1.9 date 2000.08.18.07.12.18; author PeterThoeny; state Exp; branches; next 1.8; 1.8 date 2000.07.28.23.24.51; author PeterThoeny; state Exp; branches; next 1.7; 1.7 date 2000.05.29.09.01.12; author PeterThoeny; state Exp; branches; next 1.6; 1.6 date 2000.04.22.05.03.14; author PeterThoeny; state Exp; branches; next 1.5; 1.5 date 2000.03.21.23.20.32; author PeterThoeny; state Exp; branches; next 1.4; 1.4 date 2000.03.01.03.12.47; author PeterThoeny; state Exp; branches; next 1.3; 1.3 date 2000.02.28.08.23.43; author PeterThoeny; state Exp; branches; next 1.2; 1.2 date 2000.01.30.08.45.31; author PeterThoeny; state Exp; branches; next 1.1; 1.1 date 99.06.13.07.45.37; author thoeny; state Exp; branches; next ; desc @none @ 1.82 log @buildrelease @ text @%META:TOPICINFO{author="TWikiContributor" date="1142799790" format="1.0" version="82"}% %META:TOPICPARENT{name="WebHome"}% %TOC% %STARTSECTION{type="include"}% ---# TWiki Variables _Special text strings expand on the fly to display user data or system info_ TWikiVariables are text strings - =%VARIABLE%= or =%VARIABLE{ parameter="value" }%= - that expand into content whenever a topic is rendered for viewing. There are two types of variables: 1 Preferences variables: Can be defined and changed by the user 1 Predefined variables: Defined by the TWiki system or by Plugins (for example, the SpreadSheetPlugin introduces a =%CALC{}%= variable) ---++ Using Variables To use a variable type its name. For example, * type =%T%= to get %T% (a preferences variable) * type =%TOPIC%= to get =%TOPIC%= (a predefined variable) * type =%CALC{ "$UPPER(Text)" }%= to get =TEXT= (a variable defined by Plugin) __Note:__ * To leave a variable unexpanded, precede it with an exclamation point, e.g. type =!%TOPIC%= to get =%TOPIC%= * Variables are expanded relative to the topic they are _used_ in, not the topic they are _defined_ in * Type =%ALLVARIABLES%= to get a full listing of all variables defined for a particular topic ---++ Variable Names Variable names must start with a letter. The following characters can be letters, numbers and the underscore '_'. You can use both upper-case and lower-case letters and you can mix the characteres. E.g. =%MYVAR%=, =%MyVar%=, =%My2ndVar%=, and =%My_Var%= are all valid variable names. Variables are case sensitive. =%MyVAR%= and =%MYVAR%= are not the same variable. By convention all settings, predefined variables and variables used by plugins are always UPPER-CASE. #SettingPrefs #PreferencesVariables ---++ Preferences Variables Unlike predefined variables, preferences variables can be defined by the user in various places. ---+++ Setting Preferences Variables You can set variables in all the following places: 1 local site level in [[%TWIKIWEB%.TWikiPreferences][%TWIKIWEB%.TWikiPreferences]] 1 plugin topics (see TWikiPlugins) 1 local site level in [[%LOCALSITEPREFS%][%LOCALSITEPREFS%]] 1 user level in individual user topics in %MAINWEB% web 1 web level in %WEBPREFSTOPIC% of each web 1 topic level in topics in webs 1 session variables (if sessions are enabled) Settings at higher-numbered levels override settings of the same variable at lower numbered levels, unless the variable was included in the setting of FINALPREFERENCES at a lower-numbered level, in which case it is locked at the value it has at that level. The syntax for setting Variables is the same anywhere in TWiki (on its own TWiki bullet line, including nested bullets):
=[multiple of 3 spaces] * [space] Set [space] VARIABLENAME [space] = [space] value=
*Examples:* * ==Set VARIABLENAME = value== * ==Set VARIABLENAME = value==
Spaces between the = sign and the value will be ignored. You can split a value over several lines by indenting following lines with spaces - as long as you don't try to use * as the first character on the following line.
*Example:*
   * Set VARIABLENAME = value starts here
     and continues here
Whatever you include in your Variable will be expanded on display, exactly as if it had been entered directly.
*Example: Create a custom logo variable*
* To place a logo anywhere in a web by typing ==%MYLOGO%==, define the Variable on the web's WebPreferences topic, 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, e.g. =LogoTopic=. Sample variable setting in WebPreferences: * ==Set MYLOGO = %PUBURL%/%WEB%/LogoTopic/mylogo.gif==
You can also set preferences variables on a topic by clicking the link =Edit topic preference settings= under =More topic actions=. Preferences set in this manner are not visible in the topic text, but take effect nevertheless. ---+++ Access Control Variables These are special types of preferences variables to control access to content. TWikiAccessControl explains these security settings in detail. ---+++ Local values for variables Certain topics (a users home topic, web site and default preferences topics) have a problem; variables defined in those topics can have two meanings. For example, consider a user topic. A user may want to use a double-height edit box when they are editing their home topic - but *only* when editing their home topic. The rest of the time, they want to have a normal edit box. This separation is achieved using =Local= in place of =Set= in the variable definition. For example, if the user sets the following in their home topic: * Set EDITBOXHEIGHT = 10 * Local EDITBOXHEIGHT = 20 Then when they are editing any other topic, they will get a 10 high edit box. However when they are editing their home topic, they will get a 20 high edit box. =Local= can be used wherever a preference needs to take a different value depending on where the current operation is being performed. Use this powerful feature with great care! =%ALLVARIABLES%= can be used to get a listing of the values of all variables in their evaluation order, so you can see variable scope if you get confused. ---+++ Frequently Used Preferences Variables The following preferences variables are frequently used. They are defined in TWikiPreferences#Miscellaneous_Settings: * =%BR%= - line break * =%BULLET%= - bullet sign * =%BB%= - line break and bullet combined * =%BB2%= - indented line break and bullet * =%RED% text %ENDCOLOR%= - colored text (also =%YELLOW%=, =%ORANGE%=, =%PINK%=, =%PURPLE%=, =%TEAL%=, =%NAVY%=, =%BLUE%=, =%AQUA%=, =%LIME%=, =%GREEN%=, =%OLIVE%=, =%MAROON%=, =%BROWN%=, =%BLACK%=, =%GRAY%=, =%SILVER%=, =%WHITE%=) * =%H%= - %H% Help icon * =%I%= - %I% Idea icon * =%M%= - %M% Moved to icon * =%N%= - %N% New icon * =%P%= - %P% Refactor icon * =%Q%= - %Q% Question icon * =%S%= - %S% Pick icon * =%T%= - %T% Tip icon * =%U%= - %U% Updated icon * =%X%= - %X% Alert icon * =%Y%= - %Y% Done icon There are additional useful preferences variables defined in TWikiPreferences, in [[%LOCALSITEPREFS%]], and in WebPreferences of every web. #PreDef ---++ Predefined Variables Most predefined variables return values that were either set in the configuration when TWiki was installed, or taken from server info (such as current username, or date and time). Some, like =%SEARCH%=, are powerful and general tools. * %X% Predefined variables can be overridden by [[#PreferencesVariables][preferences variables]] * %X% Plugins may extend the set of predefined variables (see individual Plugins topics for details) * %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 =%INCLUDINGTOPIC%=, =%INCLUDE%=, and the mighty =%SEARCH%=. This version of TWiki - %WIKIVERSION% - predefines the following variables: %SEARCH{ "^Var[A-Z_0-9]+$" casesensitive="on" type="regex" scope="topic" format="$percntINCLUDE{$web.$topic}$percnt" nonoise="on" }% %ENDSECTION{type="include"}% __Related Topics:__ UserDocumentationCategory @ 1.81 log @buildrelease @ text @d1 1 a1 1 %META:TOPICINFO{author="TWikiContributor" date="1142799790" format="1.0" version="81"}% d39 1 a43 1 1 plugin topics (see TWikiPlugins) d49 1 a49 1
d55 1 a55 1
d65 1 a65 1
@ 1.80 log @buildrelease @ text @d1 1 a1 1 %META:TOPICINFO{author="TWikiContributor" date="1142799790" format="1.0" version="80"}% d38 2 a39 1 1 local site level in %LOCALSITEPREFS% @ 1.79 log @buildrelease @ text @d1 1 a1 1 %META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="79"}% d4 1 a4 1 %STARTINCLUDE% d10 2 a11 2 1 Preferences variables: Can be defined and changed by the user 1 Predefined variables: Defined by the TWiki system or by Plugins (for example, the SpreadSheetPlugin introduces a =%CALC{}%= variable) d16 3 a18 3 * type =%T%= to get %T% (a preferences variable) * type =%TOPIC%= to get =%TOPIC%= (a predefined variable) * type =%CALC{ "$UPPER(Text)" }%= to get =TEXT= (a variable defined by Plugin) d21 3 a23 3 * To leave a variable unexpanded, precede it with an exclamation point, e.g. type =!%TOPIC%= to get =%TOPIC%= * Variables are expanded relative to the topic they are _used_ in, not the topic they are _defined_ in * Type =%ALLVARIABLES%= to get a full listing of all variables defined for a particular topic d25 4 d38 6 a43 6 1 local site level in %LOCALSITEPREFS% 1 user level in individual user topics in %MAINWEB% web 1 web level in %WEBPREFSTOPIC% of each web 1 topic level in topics in webs 1 plugin topics (see TWikiPlugins) 1 session variables (if sessions are enabled) d50 2 a51 2 * ==Set VARIABLENAME = value== * ==Set VARIABLENAME = value== d57 2 a58 2 * Set VARIABLENAME = value starts here and continues here d66 2 a67 2 * To place a logo anywhere in a web by typing ==%MYLOGO%==, define the Variable on the web's WebPreferences topic, 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, e.g. =LogoTopic=. Sample variable setting in WebPreferences: * ==Set MYLOGO = %PUBURL%/%WEB%/LogoTopic/mylogo.gif== d79 2 a80 2 * Set EDITBOXHEIGHT = 10 * Local EDITBOXHEIGHT = 20 d90 16 a105 16 * =%BR%= - line break * =%BULLET%= - bullet sign * =%BB%= - line break and bullet combined * =%BB2%= - indented line break and bullet * =%RED% text %ENDCOLOR%= - colored text (also =%YELLOW%=, =%ORANGE%=, =%PINK%=, =%PURPLE%=, =%TEAL%=, =%NAVY%=, =%BLUE%=, =%AQUA%=, =%LIME%=, =%GREEN%=, =%OLIVE%=, =%MAROON%=, =%BROWN%=, =%BLACK%=, =%GRAY%=, =%SILVER%=, =%WHITE%=) * =%H%= - %H% Help icon * =%I%= - %I% Idea icon * =%M%= - %M% Moved to icon * =%N%= - %N% New icon * =%P%= - %P% Refactor icon * =%Q%= - %Q% Question icon * =%S%= - %S% Pick icon * =%T%= - %T% Tip icon * =%U%= - %U% Updated icon * =%X%= - %X% Alert icon * =%Y%= - %Y% Done icon d114 3 a116 3 * %X% Predefined variables can be overridden by [[#PreferencesVariables][preferences variables]] * %X% Plugins may extend the set of predefined variables (see individual Plugins topics for details) * %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 =%INCLUDINGTOPIC%=, =%INCLUDE%=, and the mighty =%SEARCH%=. d120 8 a127 2 %INCLUDE{"TWikiVariablesAtoM"}% %INCLUDE{"TWikiVariablesNtoZ"}% d129 1 a129 1 %STOPINCLUDE% @ 1.78 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1092470123" format="1.0" version="1.78"}% d9 15 a23 1 TWikiVariables are text strings - =%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. a24 3 __Notes:__ * To leave a variable unexpanded, precede it with an exclamation point, e.g. type =!%TOPIC%= to get !%TOPIC%. * Variables are expanded relative to the topic they are _used_ in, not the topic they are _defined_ in. d26 3 a28 1 ---++ Predefined Variables d30 1 a30 1 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. d32 25 a56 1 * %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 ==%INCLUDINGTOPIC%==, ==%INCLUDE%==, and the mighty ==%SEARCH%==. d58 1 a58 1 This version of TWiki - %WIKIVERSION% - expands the following variables (enclosed in ==%== percent signs): d60 5 a64 2 %INCLUDE{"TWikiVariablesAtoM"}% %INCLUDE{"TWikiVariablesNtoZ"}% d66 1 a66 1 __Note:__ Above text is included from TWikiVariablesAtoM and TWikiVariablesNtoZ d68 1 d70 1 a70 2 #PreferencesVariables ---++ Preferences Variables d72 30 a101 166 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
Variable: Level: What: Expands to:
=%ALLOWTOPICCHANGE%= __(any topic)__ List of users and groups who are *allowed* to change the current topic. (More in TWikiAccessControl) %ALLOWTOPICCHANGE%  
=%ALLOWTOPICRENAME%= __(any topic)__ List of users and groups who are *allowed* to rename the current topic. (More in TWikiAccessControl) %ALLOWTOPICRENAME%  
=%ALLOWWEBCHANGE%= __WL__ List of users and groups who are *allowed* to change topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl) %ALLOWWEBCHANGE%  
=%ALLOWWEBRENAME%= __WL__ List of users and groups who are *allowed* to rename topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl) %ALLOWWEBRENAME%  
=%ATTACHLINKBOX%= __SL__ , __UL__ 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: %ATTACHLINKBOX% %ATTACHLINKBOX%  
=%DENYTOPICCHANGE%= __(any topic)__ List of users and groups who are *not allowed* to change the current topic. (More in TWikiAccessControl) %DENYTOPICCHANGE%  
=%DENYTOPICRENAME%= __(any topic)__ List of users and groups who are *not allowed* to rename the current topic. (More in TWikiAccessControl) %DENYTOPICRENAME%  
=%DENYWEBCHANGE%= __WL__ List of users and groups who are *not allowed* to change topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl) %DENYWEBCHANGE%  
=%DENYWEBRENAME%= __WL__ List of users and groups who are *not allowed* to rename topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl) %DENYWEBRENAME%  
=%DONTNOTIFYCHECKBOX%= __SL__ , __UL__ 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: %DONTNOTIFYCHECKBOX% %DONTNOTIFYCHECKBOX%  
=%EDITBOXHEIGHT%= __SL__ , __UL__ Vertical size of edit box, is =%EDITBOXHEIGHT%= %EDITBOXHEIGHT%  
=%EDITBOXWIDTH%= __SL__ , __UL__ Horizontal size of edit box, is =%EDITBOXWIDTH%= %EDITBOXWIDTH%  
=%EDITBOXSTYLE%= __SL__ , __UL__ 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: %EDITBOXSTYLE% %EDITBOXSTYLE%  
=%FINALPREFERENCES%= __SL__ , __WL__ List of preferences that are not allowed to be overridden by next level preferences %FINALPREFERENCES%  
=%HTTP_EQUIV_ON_EDIT%= __SL__ , __UL__ http-equiv meta tags for edit script. %HTTP_EQUIV_ON_EDIT%  
=%HTTP_EQUIV_ON_PREVIEW%= __SL__ , __UL__ http-equiv meta tags for preview script. %HTTP_EQUIV_ON_PREVIEW%  
=%HTTP_EQUIV_ON_VIEW%= __SL__ http-equiv meta tags for view, rdiff, attach, search* scripts. %HTTP_EQUIV_ON_VIEW%  
=%NEWTOPICBGCOLOR%= __SL__ , _UL_ Background color of non existing topic. ( __UL__ needs authentication for topic views ) %NEWTOPICBGCOLOR%  
=%NEWTOPICFONTCOLOR%= __SL__ , _UL_ Font color of non existing topic. ( __UL__ needs authentication for topic views ) %NEWTOPICFONTCOLOR%  
=%NOSEARCHALL%= __WL__ Exclude web from a =web="all"= search (set variable to =on= for hidden webs) %NOSEARCHALL%  
=%RELEASEEDITLOCKCHECKBOX%= __SL__ , __UL__ 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 Edit 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: %RELEASEEDITLOCKCHECKBOX% %RELEASEEDITLOCKCHECKBOX%  
=%WEBBGCOLOR%= __WL__ Background color of web %WEBBGCOLOR%  
=%WEBCOPYRIGHT%= __SL__ , __WL__ Copyright notice (bottom right corner of topics) %WEBCOPYRIGHT%  
=%WEBTOPICLIST%= __WL__ Common links of web (second line of topics) %WEBTOPICLIST%  
=%WIKIWEBLIST%= __SL__ List of %WIKITOOLNAME% webs (in upper right corner of topics) %WIKIWEBLIST%  
=%WIKIWEBMASTER%= __SL__ Webmaster email address (sender of email notifications) , is %WIKIWEBMASTER% %WIKIWEBMASTER%  
d103 1 a103 1 __Note:__ There are some more useful variables defined in the TWikiPreferences like =%BR%= for line break, colors like =%RED%= for colored text and small icons like =%H%= for a %H% Help icon. d105 2 a106 2 #SettingPrefs ---++ Setting Preferences d108 1 a108 3 * The syntax for Preferences Variables is the same anywhere in TWiki (on its own TWiki bullet line, including nested bullets):
[multiple of 3 spaces] * [space] Set [space] VARIABLENAME [space] = [value]
__Examples:__ * ==Set VARIABLENAME = value== * ==Set VARIABLENAME = value== d110 3 a112 1 ---++ Creating Custom Variables d114 1 a114 1 * 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. d116 2 a117 5
*Example: Create a custom logo variable the %WEB% web*
* To place a logo anywhere in a web by typing ==%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=: * ==Set MYLOGO = %PUBURL%/TWiki/LogoTopic/mylogo.gif==
a118 2 -- TWiki:Main.PeterThoeny - 14 Aug 2004
-- TWiki:Main.MikeMannix - 12 May 2002 d121 1 a121 3 Crawford split up this topic into included TWikiVariablesAtoM and TWikiVariablesNtoZ. -- Main.PeterThoeny - 26 Jul 2004 @ 1.77 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1084088470" format="1.0" version="1.77"}% d9 1 a9 1 TWikiVariables are text strings - =%VARIABLE%= - that expand into content whenever a page is opened. When a topic is rendered for viewing, =VARIABLES= are replaced by data, either user-entered, or info automatically generated by TWiki (like the date, or the current username). There are predefined variables, and Preference variables that you configure. You can also define custom variables, with new names and values. d11 3 a13 1 __Note:__ To leave a variable unexpanded, preceed it with an exclamation point, e.g. type =!%TOPIC%= to get !%TOPIC%. d23 4 a26 420 #VarATTACHURL ---+++ ATTACHURL -- attachment URL of the current topic * Syntax: =%ATTACHURL%= * Expands to: =%ATTACHURL%= * Example: If you attach a file you can refer to it as =%ATTACHURL%/image.gif= * Related: [[#VarATTACHURLPATH][ATTACHURLPATH]], [[#VarPUBURLPATH][PUBURLPATH]], [[#VarSCRIPTURL][SCRIPTURL]], FileAttachments #VarATTACHURLPATH ---+++ ATTACHURLPATH -- path of the attachment URL of the current topic * Syntax: =%ATTACHURLPATH%= * Expands to: =%ATTACHURLPATH%= * Related: [[#VarATTACHURL][ATTACHURL]], [[#VarPUBURL][PUBURL]], FileAttachments #VarBASETOPIC ---+++ BASETOPIC -- base topic where an INCLUDE started * The name of the topic where a single or nested INCLUDE started - same as =%TOPIC%= if there is no INCLUDE * Syntax: =%BASETOPIC%= * Related: [[#VarBASEWEB][BASEWEB]], [[#VarINCLUDINGTOPIC][INCLUDINGTOPIC]], [[#VarINCLUDE][INCLUDE]], [[#VarTOPIC][TOPIC]] #VarBASEWEB ---+++ BASEWEB -- base web where an INCLUDE started * The web name where the includes started, e.g. the web of the first topic of nested includes. Same as =%WEB%= in case there is no include. * Syntax: =%BASEWEB%= * Related: [[#VarBASETOPIC][BASETOPIC]], [[#VarINCLUDINGWEB][INCLUDINGWEB]], [[#VarINCLUDE][INCLUDE]], [[#VarWEB][WEB]] #VarDISPLAYTIME ---+++ DISPLAYTIME -- display time * Syntax: =%DISPLAYTIME%= * Expands to: =%DISPLAYTIME%= * Related: [[#VarDISPLAYTIME2][DISPLAYTIME{"format"}]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME][SERVERTIME]] #VarDISPLAYTIME2 ---+++ DISPLAYTIME{"format"} -- formatted display time * Formatted time - either GMT or Local server time, depending on setting in TWiki.cfg. Same format qualifiers as =%GMTIME%= * Syntax: =%DISPLAYTIME{"format"}%= * Example: =%DISPLAYTIME{"$hou:$min"}%= expands to =%DISPLAYTIME{"$hou:$min"}%= * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME][SERVERTIME]] #VarENCODE ---+++ ENCODE{"string"} -- encodes a string * Syntax: =%ENCODE{"string"}%= * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="string"= | String to encode | required (can be empty) | | =type="entity"= | Encode special characters into HTML entities, like a double quote into ="= | URL encoding | | =type="url"= | Encode special characters for URL parameter use, like a double quote into =%22= | (this is the default) | * Example: =%ENCODE{"spaced name"}%= expands to =%ENCODE{"spaced name"}%= * Related: [[#VarURLPARAM][URLPARAM]] #VarGMTIME ---+++ GMTIME -- GM time * Syntax: =%GMTIME%= * Expands to: =%GMTIME%= * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME2][GMTIME{"format"}]], [[#VarSERVERTIME][SERVERTIME]] #VarGMTIME2 ---+++ GMTIME{"format"} -- formatted GM time * Syntax: =%GMTIME{"format"}%= * Supported variables: | *Variable:* | *Unit:* | *Example* | | =$seconds= | seconds | 59 | | =$minutes= | minutes | 59 | | =$hours= | hours | 23 | | =$day= | day of month | 31 | | =$wday= | day of the Week (Sun, Mon, Tue, Wed, Thu, Fri, Sat) | Thu | | =$month= | month in ISO format | Dec | | =$mo= | 2 digit month | 12 | | =$year= | 4 digit year | 1999 | | =$ye= | 2 digit year | 99 | | =$tz= | either "GMT" (if set to gmtime), or "Local" (if set to servertime) | GMT | | =$iso= | ISO format timestamp | %GMTIME{"$iso"}% | | =$rcs= | RCS format timestamp | %GMTIME{"$rcs"}% | | =$http= | E-mail & http format timestamp | %GMTIME{"$http"}% | * Variables can be shortened to 3 characters * Example: =%GMTIME{"$day $month, $year - $hour:$min:$sec"}%= expands to =%GMTIME{"$day $month, $year - $hour:$min:$sec"}%= * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME][SERVERTIME]] #VarHOMETOPIC ---+++ HOMETOPIC -- home topic in each web * Syntax: =%HOMETOPIC%= * Expands to: =%HOMETOPIC%=, renders as [[%HOMETOPIC%]] * Related: [[#VarNOTIFYTOPIC][NOTIFYTOPIC]], [[#VarSTATISTICSTOPIC][STATISTICSTOPIC]], [[#VarTOPIC][TOPIC]] #VarHTTPHOST ---+++ HTTP_HOST -- environment variable * Syntax: =%HTTP_HOST%= * Expands to: =%HTTP_HOST%= * Related: [[#VarREMOTEADDR][REMOTE_ADDR]], [[#VarREMOTEPORT][REMOTE_PORT]], [[#VarREMOTEUSER][REMOTE_USER]] #VarICON ---+++ ICON{"type"} -- small icon of common attachment types * Small 16x16 pixel icon of common attachment types. Specify file type only, file name, or full path name * Syntax: =%ICON{"type"}%= * Samples: %ICON{"bmp"}% =bmp=, %ICON{"doc"}% =doc=, %ICON{"gif"}% =gif=, %ICON{"hlp"}% =hlp=, %ICON{"html"}% =html=, %ICON{"mp3"}% =mp3=, %ICON{"pdf"}% =pdf=, %ICON{"ppt"}% =ppt=, %ICON{"txt"}% =txt=, %ICON{"xls"}% =xls=, %ICON{"xml"}% =xml=, %ICON{"zip"}% =zip= * Example: =%ICON{"pdf"}%= expands to %ICON{"pdf"}% * Related: %WIKIPREFSTOPIC%, FileAttachments, TWikiDocGraphics #VarINCLUDE ---+++ INCLUDE{"page"} -- include other topics or web pages * Syntax: =%INCLUDE{"page" ...}%= * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="SomeTopic"= | The name of a topic located in the current web, i.e. =%INCLUDE{"WebNotify"}%= | | | ="Web.Topic"= | A topic in another web, i.e. =%INCLUDE{"%TWIKIWEB%.SiteMap"}%= | | | ="http://..."= | A full qualified URL, i.e. =%INCLUDE{"http://twiki.org/"}%= | | | =pattern="..."= | A RegularExpression pattern to include a subset of a topic or page | none | | =rev="1.2"= | Include a previous topic revision; N/A for URLs | top revision | | =warn="off"= | Warn if topic include fails: Fail silently (if =off=); output default warning (if set to =on=); else, output specific text (use =$topic= for topic name) | =%INCLUDE- WARNING%= [[TWikiPreferences][preferences]] setting | * Related: [[#VarBASETOPIC][BASETOPIC]], [[#VarBASEWEB][BASEWEB]], [[#VarINCLUDINGTOPIC][INCLUDINGTOPIC]], [[#VarINCLUDINGWEB][INCLUDINGWEB]], IncludeTopicsAndWebPages #VarINCLUDINGTOPIC ---+++ INCLUDINGTOPIC -- name of topic that includes current topic * The name of the topic that includes the current topic - same as =%TOPIC%= in case there is no include * Syntax: =%INCLUDINGTOPIC%= * Related: [[#VarBASETOPIC][BASETOPIC]], [[#VarINCLUDINGWEB][INCLUDINGWEB]], [[#VarINCLUDE][INCLUDE]], [[#VarTOPIC][TOPIC]] #VarINCLUDINGWEB ---+++ INCLUDINGWEB -- web that includes current topic * The web name of the topic that includes the current topic - same as =%WEB%= if there is no INCLUDE. * Syntax: =%INCLUDINGWEB%= * Related: [[#VarBASEWEB][BASEWEB]], [[#VarINCLUDINGTOPIC][INCLUDINGTOPIC]], [[#VarINCLUDE][INCLUDE]], [[#VarWEB][WEB]] #VarMAINWEB ---+++ MAINWEB -- name of Main web * The web containing %MAINWEB%.%WIKIUSERSTOPIC%, %MAINWEB%.OfficeLocations and %MAINWEB%.TWikiGroups * Syntax: =%MAINWEB%= * Expands to: =%MAINWEB%= * Related: [[#VarTWIKIWEB][TWIKIWEB]] #VarMETASEARCH ---+++ METASEARCH -- special search of meta data * Syntax: =%METASEARCH{...}%= * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | =type="topicmoved"= | What sort of search is required?
="topicmoved"= if search for a topic that may have been moved
="parent"= if searching for topics that have a specific parent i.e. its children | required | | =web="%WEB%"= | Wiki web to search: A web, a list of webs separated by whitespace, or =all= webs. | required | | =topic="%TOPIC%"= | The topic the search relates to | required | | =title="Title"= | Text that is prepended to any search results | required | * Example: =%METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%" title="This topic used to exist and was moved to: "}%= * Example: You may want to use this in WebTopicViewTemplate and WebTopicNonWikiTemplate:
=%METASEARCH{type="parent" web="%WEB%" topic="%TOPIC%" title="Children: "}%= * Related: [[#VarSEARCH][SEARCH]] #VarNOTIFYTOPIC ---+++ NOTIFYTOPIC -- name of the notify topic * Syntax: =%NOTIFYTOPIC%= * Expands to: =%NOTIFYTOPIC%=, renders as [[%NOTIFYTOPIC%]] * Related: [[#VarHOMETOPIC][HOMETOPIC]], [[#VarSTATISTICSTOPIC][STATISTICSTOPIC]], [[#VarTOPIC][TOPIC]] #VarPUBURL ---+++ PUBURL -- the base URL of attachments * Syntax: =%PUBURL%= * Expands to: =%PUBURL%= * Example: You can refer to a file attached to another topic with =%PUBURL%/%WEB%/OtherTopic/image.gif= * Related: [[#VarATTACHURL][ATTACHURL]], [[#VarPUBURLPATH][PUBURLPATH]], [[#VarSCRIPTURL][SCRIPTURL]], FileAttachments #VarPUBURLPATH ---+++ PUBURLPATH -- the base URL path of attachments * Syntax: =%PUBURLPATH%= * Expands to: =%PUBURLPATH%= * Related: [[#VarATTACHURL][ATTACHURL]], [[#VarPUBURL][PUBURL]], FileAttachments #VarREMOTEADDR ---+++ REMOTE_ADDR -- environment variable * Syntax: =%REMOTE_ADDR%= * Expands to: =%REMOTE_ADDR%= * Related: [[#VarHTTPHOST][HTTP_HOST]], [[#VarREMOTEPORT][REMOTE_PORT]], [[#VarREMOTEUSER][REMOTE_USER]] #VarREMOTEPORT ---+++ REMOTE_PORT -- environment variable * Syntax: =%REMOTE_PORT%= * Expands to: %REMOTE_PORT% * Related: [[#VarHTTPHOST][HTTP_HOST]], [[#VarREMOTEADDR][REMOTE_ADDR]], [[#VarREMOTEUSER][REMOTE_USER]] #VarREMOTEUSER ---+++ REMOTE_USER -- environment variable * Syntax: =%REMOTE_USER%= * Expands to: %REMOTE_USER% * Related: [[#VarHTTPHOST][HTTP_HOST]], [[#VarREMOTEADDR][REMOTE_ADDR]], [[#VarREMOTEPORT][REMOTE_PORT]], [[#VarUSERNAME][USERNAME]], [[#VarWIKINAME][WIKINAME]], [[#VarWIKIUSERNAME][WIKIUSERNAME]] #VarSCRIPTURL ---+++ SCRIPTURL -- script URL of %WIKITOOLNAME% * Syntax: =%SCRIPTURL%= * Expands to: =%SCRIPTURL%= * Example: To get the authenticated version of current topic write =%SCRIPTURL%/viewauth%SCRIPTSUFFIX%/%WEB%/%TOPIC%= which expands to =%SCRIPTURL%/viewauth%SCRIPTSUFFIX%/%WEB%/%TOPIC%= * Related: [[#VarPUBURL][PUBURL]], [[#VarSCRIPTSUFFIX][SCRIPTSUFFIX]], [[#VarSCRIPTURLPATH][SCRIPTURLPATH]] #VarSCRIPTURLPATH ---+++ SCRIPTURLPATH -- script URL path of %WIKITOOLNAME% * Syntax: =%SCRIPTURLPATH%= * Expands to: =%SCRIPTURLPATH%= * Related: [[#VarPUBURLPATH][PUBURLPATH]], [[#VarSCRIPTURL][SCRIPTURL]] #VarSCRIPTSUFFIX ---+++ SCRIPTSUFFIX -- script suffix * Some %WIKITOOLNAME% installations require a file extension for CGI scripts like =.pl= or =.cgi= * Syntax: =%SCRIPTSUFFIX%= * Expands to: %SCRIPTSUFFIX% * Related: [[#VarSCRIPTURL][SCRIPTURL]] #VarSEARCH ---+++ SEARCH{"text"} -- search content * Inline search, shows a search result embedded in a topic * Syntax: =%SEARCH{"text" ...}%= * Supported parameters: [1] | *Parameter:* | *Description:* | *Default:* | | ="text"= | Search term. Is a keyword search, literal search or regular expression search, depending on the =type= parameter. SearchHelp has more | required | | =search="text"= | (Alternative to above) | N/A | | =web="Name"=
=web="%MAINWEB%, Know"=
=web="all"= | Wiki web to search: A web, a list of webs separated by comma, or =all= webs. [2] | Current web | | =topic="%WEBPREFSTOPIC%"=
=topic="*Bug"= | Limit search to topics: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. | All topics in a web | | =excludetopic="Web*"=
=excludetopic="%HOMETOPIC%, WebChanges"= | Exclude topics from search: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. | None | | =type="keyword"=
=type="literal"=
=type="regex"= | Do a keyword search like =soap "web service" -shampoo=; a literal search like =web service=; or RegularExpression search like =soap;web service;!shampoo= | =%SEARCHVAR- DEFAULTTYPE%= [[TWikiPreferences][preferences]] setting (%SEARCHVARDEFAULTTYPE%) | | =scope="topic"=
=scope="text"=
=scope="all"= | Search topic name (title); the text (body) of topic; or all (both) | ="text"= | | =order="topic"=
=order="created"=
=order="modified"=
=order="editby"=
=order=
 "formfield(name)"= | Sort the results of search by the topic names, topic creation time, last modified time, last editor, or named field of TWikiForms. The sorting is done web by web; in case you want to sort across webs, create a [[FormattedSearch][formatted]] table and sort it with TablePlugin's initsort | Sort by topic name | | =limit="all"=
=limit="16"= | Limit the number of results returned. This is done after sorting in case =order= is specified | All results | | =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 | | =noheader="on"= | Suppress search header
*Topics: Changed: By:* | Show search header | | =nototal="on"= | Do not show number of topics found | Show number | | =header="..."=
=format="..."= | Custom format results: see *[[FormattedSearch]]* for usage, variables & examples | Results in table | | =expandvariables="on"= | Expand variables before applying a FormattedSearch on a search hit. Useful to show the expanded text, e.g. to show the result of a SpreadSheetPlugin =%CALC{}%= instead of the formula | Raw text | | =multiple="on"= | Multiple hits per topic. Each hit can be [[FormattedSearch][formatted]]. The last token is used in case of a regular expression ";" _and_ search | Only one hit per topic | | =separator=", "= | Line separator between hits | Newline ="$n"= | * Example: =%SEARCH{"wiki" web="%MAINWEB%" scope="topic"}%= * Example with format: =%SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="| $topic | $summary |"%= _(displays results in a table with header - [[FormattedSearch][details]])_ * %H% If the TWiki:Plugins.TablePlugin is installed, you may set a =%TABLE{}%= variable just before the =%SEARCH{}%= to alter the output of a search. Example: =%TABLE{ tablewidth="90%" }%= * Related: [[#VarMETASEARCH][METASEARCH]], [[#VarTOPICLIST][TOPICLIST]], [[#VarWEBLIST][WEBLIST]], FormattedSearch * [1] __Note__: The search form uses identical names for input fields. * [2] __Note__: A web can be excluded from a =web="all"= search if you define a =NOSEARCHALL=on= variable in its %WEBPREFSTOPIC% #VarSERVERTIME ---+++ SERVERTIME -- server time * Syntax: =%SERVERTIME%= * Expands to: =%SERVERTIME%= * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME2][SERVERTIME{"format"}]] #VarSERVERTIME2 ---+++ SERVERTIME{"format"} -- formatted server time * Same format qualifiers as =%GMTIME%= * Syntax: =%SERVERTIME{"format"}%= * Example: =%SERVERTIME{"$hou:$min"}%= expands to =%SERVERTIME{"$hou:$min"}%= * Related: [[#VarDISPLAYTIME][DISPLAYTIME]], [[#VarGMTIME][GMTIME]], [[#VarSERVERTIME][SERVERTIME]] #VarSPACEDTOPIC ---+++ SPACEDTOPIC -- topic name, spaced and encoded * The current topic name with added spaces, for regular expression search of Ref-By * Syntax: =%SPACEDTOPIC%= * Expands to: =%SPACEDTOPIC%= * Related: [[#VarTOPIC][TOPIC]] #VarSTARTINCLUDE ---+++ STARTINCLUDE -- start position of topic text if included * If present in included topic, start to include text from this location up to the end, or up to the location of the =%STOPINCLUDE%= variable. A normal view of the topic shows everyting exept the =%STARTINCLUDE%= variable itself. * Syntax: =%STARTINCLUDE%= * Related: [[#VarINCLUDE][INCLUDE]], [[#VarSTOPINCLUDE][STOPINCLUDE]] #VarSTATISTICSTOPIC ---+++ STATISTICSTOPIC -- name of statistics topic * Syntax: =%STATISTICSTOPIC%= * Expands to: =%STATISTICSTOPIC%=, renders as [[%STATISTICSTOPIC%]] * Related: [[#VarHOMETOPIC][HOMETOPIC]], [[#VarNOTIFYTOPIC][NOTIFYTOPIC]], [[#VarTOPIC][TOPIC]] #VarSTOPINCLUDE ---+++ STOPINCLUDE -- end position of topic text if included * If present in included topic, stop to include text at this location and ignore the remaining text. A normal view of the topic shows everyting exept the =%STOPINCLUDE%= variable itself. * Syntax: =%STOPINCLUDE%= * Related: [[#VarINCLUDE][INCLUDE]], [[#VarSTARTINCLUDE][STARTINCLUDE]] #VarTOC ---+++ TOC -- table of contents of current topic * Syntax: =%TOC%= * Related: [[#VarTOC2][TOC{"SomeTopic"}]] #VarTOC2 ---+++ TOC{"Topic"} -- table of contents * Syntax: =%TOC{"SomeTopic" ...}%= * Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in WikiSyntax (="---++ text"=) and HTML (="<h2>text</h2>"=) are taken into account. Any heading text after ="!!"= is excluded from the TOC; for example, write ="---+!! text"= if you do not want to list a header in the TOC * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="TopicName"= | topic name | Current topic | | =web="Name"= | Name of web | Current web | | =depth="2"= | Limit depth of headings shown in TOC | 6 | | =title="Some text"= | Title to appear at top of TOC | none | * Example: =%TOC{depth="2"}%= * Example: =%TOC{"TWikiDocumentation" web="%TWIKIWEB%" title="Contents:"}%= * Related: [[#VarTOC][TOC]] #VarTOPIC ---+++ TOPIC -- name of current topic * Syntax: =%TOPIC%= * Expands to: =%TOPIC%=, renders as [[%TOPIC%]] * Related: [[#VarBASETOPIC][BASETOPIC]], [[#VarINCLUDINGTOPIC][INCLUDINGTOPIC]], [[#VarTOPICLIST][TOPICLIST]], [[#VarWEB][WEB]] #VarTOPICLIST ---+++ TOPICLIST{"format"} -- topic index of a web * The "format" defines the format of one topic item. It may include variables: The =$name= variable gets expanded to the topic name; the =$web= variable gets expanded to the name of the web. * Syntax: =%TOPICLIST{"format" ...}%= * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="format"= | Format of one line, may include =$name= and =$web= variables | ="$name"= | | =format="format"= | (Alternative to above) | ="$name"= | | =separator=", "= | line separator | ="\n"= (new line) | | =web="Name"= | Name of web | Current web | * Example: =%TOPICLIST{" * $web.$name"}%= creates a bullet list of all topics * Example: =%TOPICLIST{separator=", "}%= creates a comma separated list of all topics * Example: =%TOPICLIST{" <option>$name</option>"}%= creates an option list (for drop down menus) * Related: [[#VarSEARCH][SEARCH]], [[#VarWEBLIST][WEBLIST]] #VarTWIKIWEB ---+++ TWIKIWEB -- name of TWiki documentation web * The web containing all documentation and site-wide preference settings for %WIKITOOLNAME% * Syntax: =%TWIKIWEB%= * Expands to: =%TWIKIWEB%= * Related: [[#VarMAINWEB][MAINWEB]] #VarURLPARAM ---+++ URLPARAM{"name"} -- get value of a URL parameter * Returns the value of a URL parameter. Note that there is a risk that this variable could be misused for cross-scripting * Syntax: =%URLPARAM{"name"}%= * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="name"= | The name of a URL parameter | required | | =default="..."= | Default value in case parameter is empty or missing | empty string | | =newline="<br />"= | Convert newlines in textarea to other delimiters | no conversion | | =encode="entity"= | Encode special characters into HTML entities, like a double quote into =&#034;=. This is needed if text is put into an HTML form field | no encoding | | =encode="url"= | Encode special characters for URL parameter use, like a double quote into =%22= | no encoding | | =multiple="on"= %BR% =multiple="[[$item]]"= | If set, gets all selected elements of a =<select multiple="multiple">= tag. A format can be specified, with =$item= indicating the element, e.g. =multiple="Option: $item"= | first element | | =separator=", "= | Separator between multiple selections. Only relevant if multiple is specified | ="\n"= (new line) | * Example: =%URLPARAM{"skin"}%= returns =print= for a =.../view/%WEB%/%TOPIC%?skin=print= URL. [[%SCRIPTURL%/viewauth%SCRIPTSUFFIX%/%WEB%/%TOPIC%?skin=print#VarURLPARAM][Test this]]: %URLPARAM{"skin"}% * Related: [[#VarSEARCH][SEARCH]], FormattedSearch #VarUSERNAME ---+++ USERNAME -- your login username * TWiki makes names available in three formats: USERNAME like =jsmith=, WIKINAME like =JohnSmith= and WIKIUSERNAME like =%MAINWEB%.JohnSmith=. A user is a %MAINWEB%.TWikiGuest in case the topic is not authenticated * Syntax: =%USERNAME%= * Expands to: =%USERNAME%= * Related: [[#VarREMOTEUSER][REMOTE_USER]], [[#VarWIKINAME][WIKINAME]], [[#VarWIKIUSERNAME][WIKIUSERNAME]], TWikiUserAuthentication #VarVAR ---+++ VAR{"NAME" web="Web"} -- get a preference value from another web * Syntax: =%VAR{"NAME" web="Web"}%= * Example: To get =%WEBBGCOLOR%= of the %MAINWEB% web write =%VAR{"WEBBGCOLOR" web="%MAINWEB%"}%=, which expands to =%VAR{"WEBBGCOLOR" web="%MAINWEB%"}%= * Related: [[#VarWEBPREFSTOPIC][WEBPREFSTOPIC]] #VarWEB ---+++ WEB -- name of current web * Syntax: =%WEB%= * Expands to: =%WEB%= * Related: [[#VarBASEWEB][BASEWEB]], [[#VarINCLUDINGWEB][INCLUDINGWEB]], [[#VarTOPIC][TOPIC]] #VarWEBLIST ---+++ WEBLIST{"format"} -- index of all webs * List of all webs. Hidden webs are excluded, e.g. webs with a =NOSEARCHALL=on= preference variable. The ="format"= defines the format of one web item. The =$name= variable gets expanded to the name of the web, =$qname= gets expanded to double quoted name, =$marker= to =marker= where web matches =selection=. * Syntax: =%WEBLIST{"format" ...}%= * Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="format"= | Format of one line, may include =$name= variable | ="$name"= | | =format="format"= | (Alternative to above) | ="$name"= | | =separator=", "= | line separator | ="\n"= (new line) | | =webs="public"= | comma sep list of Web, public expands to all non-hidden | ="public"= | | =marker="selected"= | Text for =$marker= where item matches =selection=, otherwise equals =""= | ="selected"= | | =selection="%WEB%"= | Current value to be selected in list | =section="%WEB%"= | * Example: =%WEBLIST{" * [[$name.%HOMETOPIC%]]"}%= creates a bullet list of all webs. * Example: =%WEBLIST{"<option $marker value=$qname>$name</option>" webs="Trash,public" selection="%WEB%" separator=" "}%= Dropdown of all public Webs + Trash Web, current Web highlighted. * Related: [[#VarTOPICLIST][TOPICLIST]], [[#VarSEARCH][SEARCH]] #VarWEBPREFSTOPIC ---+++ WEBPREFSTOPIC -- name of web preferences topic * Syntax: =%WEBPREFSTOPIC%= * Expands to: =%WEBPREFSTOPIC%=, renders as [[%WEBPREFSTOPIC%]] * Related: [[#VarHOMETOPIC][HOMETOPIC]], [[#VarWIKIPREFSTOPIC][WIKIPREFSTOPIC]], [[#VarVAR][VAR]] #VarWIKIHOMEURL ---+++ WIKIHOMEURL -- site home URL * The base URL of %WIKITOOLNAME%, is the link of the Home icon in the upper left corner, defined in TWiki.cfg * Syntax: =%WIKIHOMEURL%= * Expands to: =%WIKIHOMEURL%= * Related: [[#VarWIKITOOLNAME][WIKITOOLNAME]] #VarWIKINAME ---+++ WIKINAME -- your Wiki username * The WikiName is the same as %USERNAME% if not defined in the %MAINWEB%.%WIKIUSERSTOPIC% topic * Syntax: =%WIKINAME%= * Expands to: =%WIKINAME%= * Related: [[#VarREMOTEUSER][REMOTE_USER]], [[#VarUSERNAME][USERNAME]], [[#VarWIKIUSERNAME][WIKIUSERNAME]], [[#VarWIKIUSERSTOPIC][WIKIUSERSTOPIC]] #VarWIKIPREFSTOPIC ---+++ WIKIPREFSTOPIC -- name of site-wide preferences topic * Syntax: =%WIKIPREFSTOPIC%= * Expands to: =%WIKIPREFSTOPIC%=, renders as [[%WIKIPREFSTOPIC%]] * Related: [[#VarHOMETOPIC][HOMETOPIC]], [[#VarWEBPREFSTOPIC][WEBPREFSTOPIC]] #VarWIKITOOLNAME ---+++ WIKITOOLNAME -- name of your TWiki site * Syntax: =%WIKITOOLNAME%= * Expands to: =%WIKITOOLNAME%= * Related: [[#VarWIKIHOMEURL][WIKIHOMEURL]], [[#VarWIKIVERSION][WIKIVERSION]] #VarWIKIUSERNAME ---+++ WIKIUSERNAME -- your Wiki username with web prefix * Your %WIKINAME% with %MAINWEB% web prefix, useful to point to your %WIKITOOLNAME% home page * Syntax: =%WIKIUSERNAME%= * Expands to: =%WIKIUSERNAME%=, renders as %WIKIUSERNAME% * Related: [[#VarREMOTEUSER][REMOTE_USER]], [[#VarUSERNAME][USERNAME]], [[#VarWIKINAME][WIKINAME]] #VarWIKIUSERSTOPIC ---+++ WIKIUSERSTOPIC -- name of topic listing all registers users * Syntax: =%WIKIUSERSTOPIC%= * Expands to: =%WIKIUSERSTOPIC%=, with %MAINWEB% prefix renders as %MAINWEB%.%WIKIUSERSTOPIC% * Related: [[#VarWIKIUSERNAME][WIKIUSERNAME]] #VarWIKIVERSION ---+++ WIKIVERSION -- the version of the installed TWiki engine * Syntax: =%WIKIVERSION%= * Expands to: =%WIKIVERSION%= * Related: [[#VarWIKITOOLNAME][WIKITOOLNAME]] d32 4 a35 1 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): d39 1 a39 1 Variable: Level: What: d45 1 d51 1 d57 1 d63 1 d69 1 d75 1 d81 1 d87 1 d93 1 d99 1 d105 1 d111 1 d117 1 d123 1 d129 1 d135 1 d141 1 d147 1 d153 1 d159 1 d165 1 d171 1 d177 1 d183 1 d189 1 d195 1 d218 1 a218 1 -- TWiki:Main.PeterThoeny - 09 May 2004 %BR% d220 5 @ 1.76 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1080805858" format="1.0" version="1.76"}% d21 42 a62 46
Variable: Expanded to:
=%WIKIHOMEURL%= The base script URL of %WIKITOOLNAME%, is the link of the Home icon in the upper left corner, is %WIKIHOMEURL%
=%SCRIPTURL%= The script URL of %WIKITOOLNAME%, is %SCRIPTURL%
=%SCRIPTURLPATH%= The path of the script URL of %WIKITOOLNAME%, is %SCRIPTURLPATH%
=%SCRIPTSUFFIX%= The script suffix, ex: =.pl=, =.cgi= is %SCRIPTSUFFIX%
=%PUBURL%= The public URL of TWiki, is %PUBURL%
Example: You can refer to a file attached to another topic as =%PUBURL%/%WEB%/OtherTopic/image.gif=
=%PUBURLPATH%= The path of the public URL of %WIKITOOLNAME%, is %PUBURLPATH%
=%ATTACHURL%= The attachment URL of the current topic, is %ATTACHURL%
Example: If you attach a file you can refer to it as =%ATTACHURL%/image.gif=
=%ATTACHURLPATH%= The path of the attachment URL of the current topic, is %ATTACHURLPATH%
=%ICON{"type"}%= Small 16x16 pixel icon of common attachment types, like %ICON{"bmp"}% =bmp=, %ICON{"doc"}% =doc=, %ICON{"gif"}% =gif=, %ICON{"hlp"}% =hlp=, %ICON{"html"}% =html=, %ICON{"mp3"}% =mp3=, %ICON{"pdf"}% =pdf=, %ICON{"ppt"}% =ppt=, %ICON{"txt"}% =txt=, %ICON{"xls"}% =xls=, %ICON{"xml"}% =xml=, %ICON{"zip"}% =zip=, etc. Specify file type only, file name, or full path name. Example: =%ICON{"pdf"}%= returns %ICON{"pdf"}%
=%URLPARAM{"name"}%= Returns the value of a URL parameter. Note that there is a risk that this variable could be misused for cross-scripting. Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="name"= | The name of a URL parameter | required | | =default="..."= | Default value in case parameter is empty or missing | empty string | | =newline="<br />"= | Convert newlines in textarea to other delimiters | no conversion | | =encode="entity"= | Encode special characters into HTML entities, like a double quote into =&#034;=. This is needed if text is put into an HTML form field | no encoding | | =encode="url"= | Encode special characters for URL parameter use, like a double quote into =%22= | no encoding | | =multiple="on"= %BR% =multiple="[[$item]]"= | If set, gets all selected elements of a =<select multiple="multiple">= tag. A format can be specified, with =$item= indicating the element, e.g. =multiple="Option: $item"= | first element | | =separator=", "= | Separator between multiple selections. Only relevant if multiple is specified | ="\n"= (new line) | Example: =%URLPARAM{"skin"}%= returns print for a =.../view/%WEB%/%TOPIC%?skin=print= URL. Is %URLPARAM{"skin"}%
=%ENCODE{"string"}%= Encodes a string. Supported parameters: d67 55 a121 137 Example: =%ENCODE{"spaced name"}%= returns %ENCODE{"spaced name"}%
=%WIKITOOLNAME%= The name of your TWiki site - %WIKITOOLNAME%
=%WIKIVERSION%= Your current TWiki version - %WIKIVERSION%
=%USERNAME%= Your login username - %USERNAME%
=%WIKINAME%= Your Wiki username. Same as %USERNAME% if not defined in the %MAINWEB%.%WIKIUSERSTOPIC% topic. Is %WIKINAME%
=%WIKIUSERNAME%= Your %WIKINAME% including the %MAINWEB% web name - always use full signatures - %WIKIUSERNAME%
=%MAINWEB%= The web containing %MAINWEB%.%WIKIUSERSTOPIC%, %MAINWEB%.OfficeLocations and %MAINWEB%.TWikiGroups is %MAINWEB%
=%TWIKIWEB%= The web containing all documentation and site-wide preference settings for %WIKITOOLNAME% - %TWIKIWEB%
=%WEB%= The current web is %WEB%
=%BASEWEB%= The web name where the includes started, e.g. the web of the first topic of nested includes. Same as =%WEB%= in case there is no include.
=%INCLUDINGWEB%= The web name of the topic that includes the current topic - same as =%WEB%= if there is no INCLUDE.
=%HOMETOPIC%= The home topic in each web - [[%HOMETOPIC%]]
=%NOTIFYTOPIC%= The notify topic in each web - [[%NOTIFYTOPIC%]]
=%WIKIUSERSTOPIC%= The index topic of all registered users - %WIKIUSERSTOPIC%
=%WIKIPREFSTOPIC%= The site-wide preferences topic - %WIKIPREFSTOPIC%
=%WEBPREFSTOPIC%= The local web preferences topic in each web - %WEBPREFSTOPIC%
=%STATISTICSTOPIC%= The web statistics topic %STATISTICSTOPIC%
=%TOPIC%= The current topic name - %TOPIC%
=%BASETOPIC%= The name of the topic where a single or nested INCLUDE started - same as =%TOPIC%= if there is no INCLUDE.
=%INCLUDINGTOPIC%= The name of the topic that includes the current topic. Same as =%TOPIC%= in case there is no include.
=%SPACEDTOPIC%= The current topic name with added spaces, for regular expression search of Ref-By, is %SPACEDTOPIC%
=%TOPICLIST{"format"}%= Topic index of a web. The "format" defines the format of one topic item. It may include variables: The =$name= variable gets expanded to the topic name; the =$web= variable gets expanded to the name of the web. Parameters are format, separator and web: | *Parameter:* | *Description:* | *Default:* | | ="format"= | Format of one line, may include =$name= and =$web= variables | ="$name"= | | =format="format"= | (Alternative to above) | ="$name"= | | =separator=", "= | line separator | ="\n"= (new line) | | =web="Name"= | Name of web | Current web | Examples:
=%TOPICLIST{" * $web.$name"}%= creates a bullet list of all topics.
=%TOPICLIST{separator=", "}%= creates a comma separated list of all topics.
=%TOPICLIST{" <option>$name</option>"}%= creates an option list (for drop down menus).
=%WEBLIST{"format"}%= Web index, ex: list of all webs. Hidden webs are excluded, e.g. webs with a =NOSEARCHALL=on= preference variable. The ="format"= defines the format of one web item. The =$name= variable gets expanded to the name of the web, =$qname= gets expanded to double quoted name, =$marker= to =marker= where web matches =selection=. Parameters are format, separator and web: | *Parameter:* | *Description:* | *Default:* | | ="format"= | Format of one line, may include =$name= variable | ="$name"= | | =format="format"= | (Alternative to above) | ="$name"= | | =separator=", "= | line separator | ="\n"= (new line) | | =webs="public"= | comma sep list of Web, public expands to all non-hidden | ="public"= | | =marker="selected"= | Text for =$marker= where item matches =selection=, otherwise equals =""= | ="selected"= | | =selection="%WEB%"= | Current value to be selected in list | =section="%WEB%"= | Examples:
=%WEBLIST{" * [[$name.%HOMETOPIC%]]"}%= creates a bullet list of all webs.
=%WEBLIST{"<option $marker value=$qname>$name</option>" webs="Trash,public" selection="%WEB%" separator=" "}%= Dropdown of all public Webs + Trash Web, current Web highlighted.
=%GMTIME%= GM time, is %GMTIME%
=%GMTIME{"format"}%= Formatted GM time based on time variables. | *Variable:* | *Unit:* | *Example* | | =$seconds= | seconds | 59 | | =$minutes= | minutes | 59 | | =$hours= | hours | 23 | | =$day= | day of month | 31 | | =$wday= | day of the Week (Sun, Mon, Tue, Wed, Thu, Fri, Sat) | Thu | | =$month= | month in ISO format | Dec | | =$mo= | 2 digit month | 12 | | =$year= | 4 digit year | 1999 | | =$ye= | 2 digit year | 99 | | =$tz= | either "GMT" (if set to gmtime), or "Local" (if set to servertime) | GMT | | =$iso= | ISO format timestamp | %GMTIME{"$iso"}% | | =$rcs= | RCS format timestamp | %GMTIME{"$rcs"}% | | =$http= | E-mail & http format timestamp | %GMTIME{"$http"}% | Variables can be shortened to 3 characters. Example:
=%GMTIME{"$day $month, $year - $hour:$min:$sec"}%= is
%GMTIME{"$day $month, $year - $hour:$min:$sec"}%
=%SERVERTIME%= Server time, is %SERVERTIME%
=%SERVERTIME{"format"}%= Formatted server time. Same format qualifiers as =%GMTIME%=
Example: =%SERVERTIME{"$hou:$min"}%= is %SERVERTIME{"$hou:$min"}%
=%DISPLAYTIME%= Display time, is %DISPLAYTIME%
=%DISPLAYTIME{"format"}%= Formatted time - either GMT or Local server time, depending on setting in TWiki.cfg. Same format qualifiers as =%GMTIME%=
Example: =%DISPLAYTIME{"$hou:$min"}%= is %DISPLAYTIME{"$hou:$min"}%
=%HTTP_HOST%= HTTP_HOST environment variable, is %HTTP_HOST%
=%REMOTE_ADDR%= REMOTE_ADDR environment variable, is %REMOTE_ADDR%
=%REMOTE_PORT%= REMOTE_PORT environment variable, is %REMOTE_PORT%
=%REMOTE_USER%= REMOTE_USER environment variable, is %REMOTE_USER%
=%INCLUDE{"page" ...}%= Server side include to IncludeTopicsAndWebPages: d129 1 a129 65
=%STARTINCLUDE%= If present in included topic, start to include text from this location up to the end, or up to the location of the =%STOPINCLUDE%= variable. A normal view of the topic shows everyting exept the =%STARTINCLUDE%= variable itself.
=%STOPINCLUDE%= If present in included topic, stop to include text at this location and ignore the remaining text. A normal view of the topic shows everyting exept the =%STOPINCLUDE%= variable itself.
=%TOC%= Table of Contents of current topic.
=%TOC{"SomeTopic" ...}%= Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in WikiSyntax (="---++ text"=) and HTML (="<h2>text</h2>"=) are taken into account. Any heading text after ="!!"= is excluded from the TOC; for example, write ="---+!! text"= if you do not want to list a header in the TOC. Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="TopicName"= | topic name | Current topic | | =web="Name"= | Name of web | Current web | | =depth="2"= | Limit depth of headings shown in TOC | 6 | | =title="Some text"= | Title to appear at top of TOC | none | Examples: =%TOC{depth="2"}%=, =%TOC{"TWikiDocumentation" web="%TWIKIWEB%" title="Contents:"}%=
=%SEARCH{"text" ...}%= Inline search, shows a search result embedded in a topic. Parameters are the search term, web, scope, order and many more: [1] | *Parameter:* | *Description:* | *Default:* | | ="text"= | Search term. Is a keyword search, literal search or regular expression search, depending on the =type= parameter. SearchHelp has more | required | | =search="text"= | (Alternative to above) | N/A | | =web="Name"=
=web="%MAINWEB%, Know"=
=web="all"= | Wiki web to search: A web, a list of webs separated by comma, or =all= webs. [2] | Current web | | =topic="%WEBPREFSTOPIC%"=
=topic="*Bug"= | Limit search to topics: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. | All topics in a web | | =excludetopic="Web*"=
=excludetopic="%HOMETOPIC%, WebChanges"= | Exclude topics from search: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. | None | | =type="keyword"=
=type="literal"=
=type="regex"= | Do a keyword search like =soap "web service" -shampoo=; a literal search like =web service=; or RegularExpression search like =soap;web service;!shampoo= | =%SEARCHVAR- DEFAULTTYPE%= [[TWikiPreferences][preferences]] setting | | =scope="topic"=
=scope="text"=
=scope="all"= | Search topic name (title); the text (body) of topic; or all (both) | ="text"= | | =order="topic"=
=order="created"=
=order="modified"=
=order="editby"=
=order=
 "formfield(name)"= | Sort the results of search by the topic names, topic creation time, last modified time, last editor, or named field of TWikiForms. The sorting is done web by web; in case you want to sort across webs, create a [[FormattedSearch][formatted]] table and sort it with TablePlugin's initsort | Sort by topic name | | =limit="all"=
=limit="16"= | Limit the number of results returned. This is done after sorting in case =order= is specified | All results | | =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 | | =noheader="on"= | Suppress search header
*Topics: Changed: By:* | Show search header | | =nototal="on"= | Do not show number of topics found | Show number | | =header="..."=
=format="..."= | Custom format results: see *[[FormattedSearch]]* for usage, variables & examples | Results in table | | =expandvariables="on"= | Expand variables before applying a FormattedSearch on a search hit. Useful to show the expanded text, e.g. to show the result of a SpreadSheetPlugin =%CALC{}%= instead of the formula | Raw text | | =multiple="on"= | Multiple hits per topic. Each hit can be [[FormattedSearch][formatted]]. The last token is used in case of a regular expression ";" _and_ search | Only one hit per topic | | =separator=", "= | Line separator between hits | Newline ="$n"= | Example: =%SEARCH{"wiki" web="%MAINWEB%" scope="topic"}%=
Formatted example: ==%SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="| $topic | $summary |"%== _(displays results in a table with header - [[FormattedSearch][details]])_
%H% If the TWiki:Plugins.TablePlugin is installed, you may set a =%TABLE{}%= variable just before the =%SEARCH{}%= to alter the output of a search. Example: ==%TABLE{ tablewidth="90%" }%==
=%METASEARCH{...}%= Special search of meta data | *Parameter:* | *Description:* | *Default:* | | =type="topicmoved"= | What sort of search is required?
\ ="topicmoved"= if search for a topic that may have been moved
\ ="parent"= if searching for topics that have a specific parent i.e. its \ children | required | | =web="%WEB%"= | Wiki web to search: A web, a list of webs separated by whitespace, or =all= webs. | required | | =topic="%TOPIC%"= | The topic the search relates to | required | | =title="Title"= | Text that is prepended to any search results | required | Example: ==%METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%" title="This topic used to exist and was moved to: "}%==, you may want to use this in WebTopicViewTemplate and WebTopicNonWikiTemplate
==%METASEARCH{type="parent" web="%WEB%" topic="%TOPIC%" title="Children: "}%==
=%VAR{"NAME" web="Web"}%= Get a preference value from a web other then the current one. Example: To get =%WEBBGCOLOR%= of the %MAINWEB% web write =%VAR{"WEBBGCOLOR" web="%MAINWEB%"}%=, is =%VAR{"WEBBGCOLOR" web="%MAINWEB%"}%=
d131 310 a440 2
[1] __Note__: The search form uses identical names for input fields. a441 2 [2] __Note__: A web can be excluded from a ==web="all"== search if you define a ==NOSEARCHALL=on== variable in its %WEBPREFSTOPIC%.
d451 18 a468 10 =%WIKIWEBMASTER%= __SL__ Webmaster email address (sender of email notifications) , is %WIKIWEBMASTER% =%WIKIWEBLIST%= __SL__ List of %WIKITOOLNAME% webs (in upper right corner of topics) =%WEBTOPICLIST%= d470 19 a488 7 Common links of web (second line of topics) =%WEBCOPYRIGHT%= __SL__ , __WL__ Copyright notice (bottom right corner of topics) =%WEBBGCOLOR%= d490 4 a493 3 Background color of web =%NOSEARCHALL%= d495 4 a498 11 Exclude web from a =web="all"= search (set variable to =on= for hidden webs) =%NEWTOPICBGCOLOR%= __SL__ , _UL_ Background color of non existing topic. ( __UL__ needs authentication for topic views ) =%NEWTOPICFONTCOLOR%= __SL__ , _UL_ Font color of non existing topic. ( __UL__ needs authentication for topic views ) =%EDITBOXWIDTH%= d500 3 a502 2 Horizontal size of edit box, is =%EDITBOXWIDTH%= d506 7 a512 1 d516 7 a522 17 =%RELEASEEDITLOCKCHECKBOX%= __SL__ , __UL__ 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 Edit 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: %RELEASEEDITLOCKCHECKBOX% =%DONTNOTIFYCHECKBOX%= __SL__ , __UL__ 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: %DONTNOTIFYCHECKBOX% =%ATTACHLINKBOX%= __SL__ , __UL__ 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: %ATTACHLINKBOX% =%HTTP_EQUIV_ON_VIEW%= __SL__ http-equiv meta tags for view, rdiff, attach, search* scripts. d526 2 a527 1 d531 18 a548 2 =%DENYWEBCHANGE%= d550 9 a558 3 List of users and groups who are *not allowed* to change topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl) =%ALLOWWEBCHANGE%= d560 9 a568 11 List of users and groups who are *allowed* to change topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl) =%DENYTOPICCHANGE%= __(any topic)__ List of users and groups who are *not allowed* to change the current topic. (More in TWikiAccessControl) =%ALLOWTOPICCHANGE%= __(any topic)__ List of users and groups who are *allowed* to change the current topic. (More in TWikiAccessControl) =%DENYWEBRENAME%= d570 13 a582 18 List of users and groups who are *not allowed* to rename topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl) =%ALLOWWEBRENAME%= __WL__ List of users and groups who are *allowed* to rename topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl) =%DENYTOPICRENAME%= __(any topic)__ List of users and groups who are *not allowed* to rename the current topic. (More in TWikiAccessControl) =%ALLOWTOPICRENAME%= __(any topic)__ List of users and groups who are *allowed* to rename the current topic. (More in TWikiAccessControl) =%FINALPREFERENCES%= __SL__ , __WL__ List of preferences that are not allowed to be overridden by next level preferences d603 1 a603 1 -- TWiki:Main.PeterThoeny - 16 Mar 2004
@ 1.75 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1079505060" format="1.0" version="1.75"}% d3 420 a422 417 %TOC% %STARTINCLUDE% ---# TWiki Variables _Special text strings expand on the fly to display user data or system info_ TWikiVariables are text strings - =%VARIABLE%= - that expand into content whenever a page is opened. When a topic is rendered for viewing, =VARIABLES= are replaced by data, either user-entered, or info automatically generated by TWiki (like the date, or the current username). There are predefined variables, and Preference variables that you configure. You can also define custom variables, with new names and values. ---++ 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 ==%INCLUDINGTOPIC%==, ==%INCLUDE%==, and the mighty ==%SEARCH%==. This version of TWiki - %WIKIVERSION% - expands the following variables (enclosed in ==%== percent signs):
Variable: Expanded to:
=%WIKIHOMEURL%= The base script URL of %WIKITOOLNAME%, is the link of the Home icon in the upper left corner, is %WIKIHOMEURL%
=%SCRIPTURL%= The script URL of %WIKITOOLNAME%, is %SCRIPTURL%
=%SCRIPTURLPATH%= The path of the script URL of %WIKITOOLNAME%, is %SCRIPTURLPATH%
=%SCRIPTSUFFIX%= The script suffix, ex: =.pl=, =.cgi= is %SCRIPTSUFFIX%
=%PUBURL%= The public URL of TWiki, is %PUBURL%
Example: You can refer to a file attached to another topic as =%PUBURL%/%WEB%/OtherTopic/image.gif=
=%PUBURLPATH%= The path of the public URL of %WIKITOOLNAME%, is %PUBURLPATH%
=%ATTACHURL%= The attachment URL of the current topic, is %ATTACHURL%
Example: If you attach a file you can refer to it as =%ATTACHURL%/image.gif=
=%ATTACHURLPATH%= The path of the attachment URL of the current topic, is %ATTACHURLPATH%
=%ICON{"type"}%= Small 16x16 pixel icon of common attachment types, like %ICON{"bmp"}% =bmp=, %ICON{"doc"}% =doc=, %ICON{"gif"}% =gif=, %ICON{"hlp"}% =hlp=, %ICON{"html"}% =html=, %ICON{"mp3"}% =mp3=, %ICON{"pdf"}% =pdf=, %ICON{"ppt"}% =ppt=, %ICON{"txt"}% =txt=, %ICON{"xls"}% =xls=, %ICON{"xml"}% =xml=, %ICON{"zip"}% =zip=, etc. Specify file type only, file name, or full path name. Example: =%ICON{"pdf"}%= returns %ICON{"pdf"}%
=%URLPARAM{"name"}%= Returns the value of a URL parameter. Note that there is a risk that this variable could be misused for cross-scripting. Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="name"= | The name of a URL parameter | required | | =default="..."= | Default value in case parameter is empty or missing | empty string | | =newline="<br />"= | Convert newlines in textarea to other delimiters | no conversion | | =encode="entity"= | Encode special characters into HTML entities, like a double quote into =&#034;=. This is needed if text is put into an HTML form field | no encoding | | =encode="url"= | Encode special characters for URL parameter use, like a double quote into =%22= | no encoding | | =multiple="on"= %BR% =multiple="[[$item]]"= | If set, gets all selected elements of a =<select multiple="multiple">= tag. A format can be specified, with =$item= indicating the element, e.g. =multiple="Option: $item"= | first element | | =separator=", "= | Separator between multiple selections. Only relevant if multiple is specified | ="\n"= (new line) | Example: =%URLPARAM{"skin"}%= returns print for a =.../view/%WEB%/%TOPIC%?skin=print= URL. Is %URLPARAM{"skin"}%
=%ENCODE{"string"}%= Encodes a string. Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="string"= | String to encode | required (can be empty) | | =type="entity"= | Encode special characters into HTML entities, like a double quote into =&#034;= | URL encoding | | =type="url"= | Encode special characters for URL parameter use, like a double quote into =%22= | (this is the default) | Example: =%ENCODE{"spaced name"}%= returns %ENCODE{"spaced name"}%
=%WIKITOOLNAME%= The name of your TWiki site - %WIKITOOLNAME%
=%WIKIVERSION%= Your current TWiki version - %WIKIVERSION%
=%USERNAME%= Your login username - %USERNAME%
=%WIKINAME%= Your Wiki username. Same as %USERNAME% if not defined in the %MAINWEB%.%WIKIUSERSTOPIC% topic. Is %WIKINAME%
=%WIKIUSERNAME%= Your %WIKINAME% including the %MAINWEB% web name - always use full signatures - %WIKIUSERNAME%
=%MAINWEB%= The web containing %MAINWEB%.%WIKIUSERSTOPIC%, %MAINWEB%.OfficeLocations and %MAINWEB%.TWikiGroups is %MAINWEB%
=%TWIKIWEB%= The web containing all documentation and site-wide preference settings for %WIKITOOLNAME% - %TWIKIWEB%
=%WEB%= The current web is %WEB%
=%BASEWEB%= The web name where the includes started, e.g. the web of the first topic of nested includes. Same as =%WEB%= in case there is no include.
=%INCLUDINGWEB%= The web name of the topic that includes the current topic - same as =%WEB%= if there is no INCLUDE.
=%HOMETOPIC%= The home topic in each web - [[%HOMETOPIC%]]
=%NOTIFYTOPIC%= The notify topic in each web - [[%NOTIFYTOPIC%]]
=%WIKIUSERSTOPIC%= The index topic of all registered users - %WIKIUSERSTOPIC%
=%WIKIPREFSTOPIC%= The site-wide preferences topic - %WIKIPREFSTOPIC%
=%WEBPREFSTOPIC%= The local web preferences topic in each web - %WEBPREFSTOPIC%
=%STATISTICSTOPIC%= The web statistics topic %STATISTICSTOPIC%
=%TOPIC%= The current topic name - %TOPIC%
=%BASETOPIC%= The name of the topic where a single or nested INCLUDE started - same as =%TOPIC%= if there is no INCLUDE.
=%INCLUDINGTOPIC%= The name of the topic that includes the current topic. Same as =%TOPIC%= in case there is no include.
=%SPACEDTOPIC%= The current topic name with added spaces, for regular expression search of Ref-By, is %SPACEDTOPIC%
=%TOPICLIST{"format"}%= Topic index of a web. The "format" defines the format of one topic item. It may include variables: The =$name= variable gets expanded to the topic name; the =$web= variable gets expanded to the name of the web. Parameters are format, separator and web: | *Parameter:* | *Description:* | *Default:* | | ="format"= | Format of one line, may include =$name= and =$web= variables | ="$name"= | | =format="format"= | (Alternative to above) | ="$name"= | | =separator=", "= | line separator | ="\n"= (new line) | | =web="Name"= | Name of web | Current web | Examples:
=%TOPICLIST{" * $web.$name"}%= creates a bullet list of all topics.
=%TOPICLIST{separator=", "}%= creates a comma separated list of all topics.
=%TOPICLIST{" <option>$name</option>"}%= creates an option list (for drop down menus).
=%WEBLIST{"format"}%= Web index, ex: list of all webs. Hidden webs are excluded, e.g. webs with a =NOSEARCHALL=on= preference variable. The ="format"= defines the format of one web item. The =$name= variable gets expanded to the name of the web, =$qname= gets expanded to double quoted name, =$marker= to =marker= where web matches =selection=. Parameters are format, separator and web: | *Parameter:* | *Description:* | *Default:* | | ="format"= | Format of one line, may include =$name= variable | ="$name"= | | =format="format"= | (Alternative to above) | ="$name"= | | =separator=", "= | line separator | ="\n"= (new line) | | =webs="public"= | comma sep list of Web, public expands to all non-hidden | ="public"= | | =marker="selected"= | Text for =$marker= where item matches =selection=, otherwise equals =""= | ="selected"= | | =selection="%WEB%"= | Current value to be selected in list | =section="%WEB%"= | Examples:
=%WEBLIST{" * [[$name.%HOMETOPIC%]]"}%= creates a bullet list of all webs.
=%WEBLIST{"<option $marker value=$qname>$name</option>" webs="Trash,public" selection="%WEB%" separator=" "}%= Dropdown of all public Webs + Trash Web, current Web highlighted.
=%GMTIME%= GM time, is %GMTIME%
=%GMTIME{"format"}%= Formatted GM time based on time variables. | *Variable:* | *Unit:* | *Example* | | =$seconds= | seconds | 59 | | =$minutes= | minutes | 59 | | =$hours= | hours | 23 | | =$day= | day of month | 31 | | =$wday= | day of the Week (Sun, Mon, Tue, Wed, Thu, Fri, Sat) | Thu | | =$month= | month in ISO format | Dec | | =$mo= | 2 digit month | 12 | | =$year= | 4 digit year | 1999 | | =$ye= | 2 digit year | 99 | | =$tz= | either "GMT" (if set to gmtime), or "Local" (if set to servertime) | GMT | | =$iso= | ISO format timestamp | %GMTIME{"$iso"}% | | =$rcs= | RCS format timestamp | %GMTIME{"$rcs"}% | | =$http= | E-mail & http format timestamp | %GMTIME{"$http"}% | Variables can be shortened to 3 characters. Example:
=%GMTIME{"$day $month, $year - $hour:$min:$sec"}%= is
%GMTIME{"$day $month, $year - $hour:$min:$sec"}%
=%SERVERTIME%= Server time, is %SERVERTIME%
=%SERVERTIME{"format"}%= Formatted server time. Same format qualifiers as =%GMTIME%=
Example: =%SERVERTIME{"$hou:$min"}%= is %SERVERTIME{"$hou:$min"}%
=%DISPLAYTIME%= Display time, is %DISPLAYTIME%
=%DISPLAYTIME{"format"}%= Formatted time - either GMT or Local server time, depending on setting in TWiki.cfg. Same format qualifiers as =%GMTIME%=
Example: =%DISPLAYTIME{"$hou:$min"}%= is %DISPLAYTIME{"$hou:$min"}%
=%HTTP_HOST%= HTTP_HOST environment variable, is %HTTP_HOST%
=%REMOTE_ADDR%= REMOTE_ADDR environment variable, is %REMOTE_ADDR%
=%REMOTE_PORT%= REMOTE_PORT environment variable, is %REMOTE_PORT%
=%REMOTE_USER%= REMOTE_USER environment variable, is %REMOTE_USER%
=%INCLUDE{"page" ...}%= Server side include to IncludeTopicsAndWebPages: | *Parameter:* | *Description:* | *Default:* | | ="SomeTopic"= | The name of a topic located in the current web, i.e. =%INCLUDE{"WebNotify"}%= | | | ="Web.Topic"= | A topic in another web, i.e. =%INCLUDE{"%TWIKIWEB%.SiteMap"}%= | | | ="http://..."= | A full qualified URL, i.e. =%INCLUDE{"http://twiki.org/"}%= | | | =pattern="..."= | A RegularExpression pattern to include a subset of a topic or page | none | | =rev="1.2"= | Include a previous topic revision; N/A for URLs | top revision | | =warn="off"= | Warn if topic include fails: Fail silently (if =off=); output default warning (if set to =on=); else, output specific text (use =$topic= for topic name) | =%INCLUDE- WARNING%= [[TWikiPreferences][preferences]] setting |
=%STARTINCLUDE%= If present in included topic, start to include text from this location up to the end, or up to the location of the =%STOPINCLUDE%= variable. A normal view of the topic shows everyting exept the =%STARTINCLUDE%= variable itself.
=%STOPINCLUDE%= If present in included topic, stop to include text at this location and ignore the remaining text. A normal view of the topic shows everyting exept the =%STOPINCLUDE%= variable itself.
=%TOC%= Table of Contents of current topic.
=%TOC{"SomeTopic" ...}%= Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in WikiSyntax (="---++ text"=) and HTML (="<h2>text</h2>"=) are taken into account. Any heading text after ="!!"= is excluded from the TOC; for example, write ="---+!! text"= if you do not want to list a header in the TOC. Supported parameters: | *Parameter:* | *Description:* | *Default:* | | ="TopicName"= | topic name | Current topic | | =web="Name"= | Name of web | Current web | | =depth="2"= | Limit depth of headings shown in TOC | 6 | | =title="Some text"= | Title to appear at top of TOC | none | Examples: =%TOC{depth="2"}%=, =%TOC{"TWikiDocumentation" web="%TWIKIWEB%" title="Contents:"}%=
=%SEARCH{"text" ...}%= Inline search, shows a search result embedded in a topic. Parameters are the search term, web, scope, order and many more: [1] | *Parameter:* | *Description:* | *Default:* | | ="text"= | Search term. Is a keyword search, literal search or regular expression search, depending on the =type= parameter. SearchHelp has more | required | | =search="text"= | (Alternative to above) | N/A | | =web="Name"=
=web="%MAINWEB%, Know"=
=web="all"= | Wiki web to search: A web, a list of webs separated by comma, or =all= webs. [2] | Current web | | =topic="%WEBPREFSTOPIC%"=
=topic="*Bug"= | Limit search to topics: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. | All topics in a web | | =excludetopic="Web*"=
=excludetopic="%HOMETOPIC%, WebChanges"= | Exclude topics from search: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. | None | | =type="keyword"=
=type="literal"=
=type="regex"= | Do a keyword search like =soap "web service" -shampoo=; a literal search like =web service=; or RegularExpression search like =soap;web service;!shampoo= | =%SEARCHVAR- DEFAULTTYPE%= [[TWikiPreferences][preferences]] setting | | =scope="topic"=
=scope="text"=
=scope="all"= | Search topic name (title); the text (body) of topic; or all (both) | ="text"= | | =order="topic"=
=order="created"=
=order="modified"=
=order="editby"=
=order=
 "formfield(name)"= | Sort the results of search by the topic names, topic creation time, last modified time, last editor, or named field of TWikiForms. The sorting is done web by web; in case you want to sort across webs, create a [[FormattedSearch][formatted]] table and sort it with TablePlugin's initsort | Sort by topic name | | =limit="all"=
=limit="16"= | Limit the number of results returned. This is done after sorting in case =order= is specified | All results | | =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 | | =noheader="on"= | Suppress search header
*Topics: Changed: By:* | Show search header | | =nototal="on"= | Do not show number of topics found | Show number | | =header="..."=
=format="..."= | Custom format results: see *[[FormattedSearch]]* for usage, variables & examples | Results in table | | =expandvariables="on"= | Expand variables before applying a FormattedSearch on a search hit. Useful to show the expanded text, e.g. to show the result of a SpreadSheetPlugin =%CALC{}%= instead of the formula | Raw text | | =multiple="on"= | Multiple hits per topic. Each hit can be [[FormattedSearch][formatted]]. The last token is used in case of a regular expression ";" _and_ search | Only one hit per topic | | =separator=", "= | Line separator between hits | Newline ="$n"= | Example: =%SEARCH{"wiki" web="%MAINWEB%" scope="topic"}%=
Formatted example: ==%SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="| $topic | $summary |"%== _(displays results in a table with header - [[FormattedSearch][details]])_
%H% If the TWiki:Plugins.TablePlugin is installed, you may set a =%TABLE{}%= variable just before the =%SEARCH{}%= to alter the output of a search. Example: ==%TABLE{ tablewidth="90%" }%==
=%METASEARCH{...}%= Special search of meta data | *Parameter:* | *Description:* | *Default:* | | =type="topicmoved"= | What sort of search is required?
\ ="topicmoved"= if search for a topic that may have been moved
\ ="parent"= if searching for topics that have a specific parent i.e. its \ children | required | | =web="%WEB%"= | Wiki web to search: A web, a list of webs separated by whitespace, or =all= webs. | required | | =topic="%TOPIC%"= | The topic the search relates to | required | | =title="Title"= | Text that is prepended to any search results | required | Example: ==%METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%" title="This topic used to exist and was moved to: "}%==, you may want to use this in WebTopicViewTemplate and WebTopicNonWikiTemplate
==%METASEARCH{type="parent" web="%WEB%" topic="%TOPIC%" title="Children: "}%==
=%VAR{"NAME" web="Web"}%= Get a preference value from a web other then the current one. Example: To get =%WEBBGCOLOR%= of the %MAINWEB% web write =%VAR{"WEBBGCOLOR" web="%MAINWEB%"}%=, is =%VAR{"WEBBGCOLOR" web="%MAINWEB%"}%=
[1] __Note__: The search form uses identical names for input fields. [2] __Note__: A web can be excluded from a ==web="all"== search if you define a ==NOSEARCHALL=on== variable in its %WEBPREFSTOPIC%.
#PreferencesVariables ---++ Preferences Variables 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):
Variable: Level: What:
=%WIKIWEBMASTER%= __SL__ Webmaster email address (sender of email notifications) , is %WIKIWEBMASTER%
=%WIKIWEBLIST%= __SL__ List of %WIKITOOLNAME% webs (in upper right corner of topics)
=%WEBTOPICLIST%= __WL__ Common links of web (second line of topics)
=%WEBCOPYRIGHT%= __SL__ , __WL__ Copyright notice (bottom right corner of topics)
=%WEBBGCOLOR%= __WL__ Background color of web
=%NOSEARCHALL%= __WL__ Exclude web from a =web="all"= search (set variable to =on= for hidden webs)
=%NEWTOPICBGCOLOR%= __SL__ , _UL_ Background color of non existing topic. ( __UL__ needs authentication for topic views )
=%NEWTOPICFONTCOLOR%= __SL__ , _UL_ Font color of non existing topic. ( __UL__ needs authentication for topic views )
=%EDITBOXWIDTH%= __SL__ , __UL__ Horizontal size of edit box, is =%EDITBOXWIDTH%=
=%EDITBOXHEIGHT%= __SL__ , __UL__ Vertical size of edit box, is =%EDITBOXHEIGHT%=
=%EDITBOXSTYLE%= __SL__ , __UL__ 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: %EDITBOXSTYLE%
=%RELEASEEDITLOCKCHECKBOX%= __SL__ , __UL__ 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 Edit 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: %RELEASEEDITLOCKCHECKBOX%
=%DONTNOTIFYCHECKBOX%= __SL__ , __UL__ 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: %DONTNOTIFYCHECKBOX%
=%ATTACHLINKBOX%= __SL__ , __UL__ 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: %ATTACHLINKBOX%
=%HTTP_EQUIV_ON_VIEW%= __SL__ http-equiv meta tags for view, rdiff, attach, search* scripts.
=%HTTP_EQUIV_ON_EDIT%= __SL__ , __UL__ http-equiv meta tags for edit script.
=%HTTP_EQUIV_ON_PREVIEW%= __SL__ , __UL__ http-equiv meta tags for preview script.
=%DENYWEBCHANGE%= __WL__ List of users and groups who are *not allowed* to change topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl)
=%ALLOWWEBCHANGE%= __WL__ List of users and groups who are *allowed* to change topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl)
=%DENYTOPICCHANGE%= __(any topic)__ List of users and groups who are *not allowed* to change the current topic. (More in TWikiAccessControl)
=%ALLOWTOPICCHANGE%= __(any topic)__ List of users and groups who are *allowed* to change the current topic. (More in TWikiAccessControl)
=%DENYWEBRENAME%= __WL__ List of users and groups who are *not allowed* to rename topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl)
=%ALLOWWEBRENAME%= __WL__ List of users and groups who are *allowed* to rename topics in the %WIKITOOLNAME% web. (More in TWikiAccessControl)
=%DENYTOPICRENAME%= __(any topic)__ List of users and groups who are *not allowed* to rename the current topic. (More in TWikiAccessControl)
=%ALLOWTOPICRENAME%= __(any topic)__ List of users and groups who are *allowed* to rename the current topic. (More in TWikiAccessControl)
=%FINALPREFERENCES%= __SL__ , __WL__ List of preferences that are not allowed to be overridden by next level preferences
__Note:__ There are some more useful variables defined in the TWikiPreferences like =%BR%= for line break, colors like =%RED%= for colored text and small icons like =%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):
[multiple of 3 spaces] * [space] Set [space] VARIABLENAME [space] = [value]
__Examples:__ * ==Set VARIABLENAME = value== * ==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.
*Example: Create a custom logo variable the %WEB% web*
* To place a logo anywhere in a web by typing ==%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=: * ==Set MYLOGO = %PUBURL%/TWiki/LogoTopic/mylogo.gif==
-- TWiki:Main.PeterThoeny - 16 Mar 2004
-- TWiki:Main.MikeMannix - 12 May 2002 @ 1.74 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1074472194" format="1.0" version="1.74"}% d55 1 a55 1 | =newline="<br />"= | Convert newlines to other delimiters | no conversion | d58 2 d165 13 a177 8 | $seconds | seconds | 59 | | $minutes | minutes | 59 | | $hours | hours | 23 | | $day | day of month | 31 | | $month | month in ISO format | Dec | | $mo | 2 digit month | 12 | | $year | 4 digit year | 1999 | | $ye | 2 digit year | 99 | d184 7 a190 1 Formatted server time.
Example: =%SERVERTIME{"$hou:$min"}%= is %SERVERTIME{"$hou:$min"}% d243 2 a244 2 | =order="topic"=
=order="modified"=
=order="editby"=
=order=
 "formfield(name)"= | Sort the results of search by the topic names, last modified time, last editor, or named field of TWikiForms | Sort by topic name | | =limit="all"=
=limit="16"= | Limit the number of results returned | All results | d253 1 d418 1 a418 1 -- TWiki:Main.PeterThoeny - 14 Jan 2004
@ 1.73 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1074417117" format="1.0" version="1.73"}% d50 1 a50 1 =%PARAM{"name"}%= d58 1 a58 1 Example: =%PARAM{"skin"}%= returns print for a =.../view/%WEB%/%TOPIC%?skin=print= URL. Is %PARAM{"skin"}% @ 1.72 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1074237929" format="1.0" version="1.72"}% d9 1 a9 1 TWikiVariables are text strings - =%VARIABLE%= - that expand into content whenever a page is opened. When a topic is rendered for viewing, =VARIABLES= are replaced by data, either user-entered, or info automatically generated by TWiki (like the date, or the current username). There are predefined variables, and Preference variables that you configure. You can also define custom variables, with new names and values. d19 1 a19 1 d199 1 a199 1 | =warn="off"= | Warn if topic include fails: Fail silently (if =off=); output default warning (if set to =on=); else, output specific text (use =$topic= for topic name) | =%INCLUDE- WARNING%= preferences setting | d223 1 a223 1 | ="text"= | Search term. Is a regular expression or literal, depending on the =regex= parameter. For regular expressions ";" is used to mean _and_ e.g. "search;agrep" will find all topic containing search _and_ agrep. | required | d228 2 a229 1 | =scope="topic"=
=scope="text"= | Search topic name (title) or in the text (body) of the topic | Topic text (body) | a231 1 | =regex="on"= | RegularExpression search; also enables ";" as _and_ | Literal search | d242 1 a242 1 Regular example: =%SEARCH{"wiki" web="%MAINWEB%" scope="topic"}%=
d276 1 a276 1
a379 1 a384 1
a385 1
@ 1.71 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1073719550" format="1.0" version="1.71"}% d50 2 a51 2 d212 1 a212 1 @ 1.69 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1064795307" format="1.0" version="1.69"}% d217 3 a219 1 | =web="Name"=
=web="%MAINWEB% Know"=
=web="all"= | Wiki web to search: A web, a list of webs separated by whitespace, or =all= webs. [2] | Current web | @ 1.68 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1062139775" format="1.0" version="1.68"}% d51 1 a51 1 @ 1.64 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1048314917" format="1.0" version="1.64"}% d46 3 @ 1.63 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1044751568" format="1.0" version="1.63"}% d380 1 a380 1 *Example: Create a custom logo variable the %WEB% web*
@ 1.62 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1043655738" format="1.0" version="1.62"}% d297 4 @ 1.61 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1042964469" format="1.0" version="1.61"}% d249 1 @ 1.60 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1039594200" format="1.0" version="1.60"}% d221 2 a222 1 Formatted example: ==%SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="| $topic | $summary |"%== _(displays results in a table with header - [[FormattedSearch][details]])_ d380 1 a380 1 -- PeterThoeny - 13 Sep 2001
@ 1.59 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1038026520" format="1.0" version="1.59"}% d176 7 a182 4
d354 5 d362 3 a364 3 * The syntax for Preferences Variables is the same anywhere in TWiki (on its own TWiki bullet line, including nested bullets):
[3 spaces] * [space] Set [space] VARIABLENAME [space] = [value]
__Examples:__ * ==Set VARIABLENAME = =value=== * ==Set VARIABLENAME = =value=== @ 1.56 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1023240035" format="1.0" version="1.56"}% d138 1 a138 1 =%WEBLIST{"" webs="Trash,public" selection="%WEB%" separator=" "}%= Dropdown of all public Webs + Trash Web, current Web highlighted. @ 1.55 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1022256244" format="1.0" version="1.55"}% d192 1 a192 1 d49 3 @ 1.52 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="1021201634" format="1.0" version="1.52"}% d175 1 a175 1 | ="Web.Topic"= | A topic in another web, i.e. =%INCLUDE{"%TWIKIWEB%.TWikiSiteMap"}%= | d369 1 a369 1 -- Main.MikeMannix - 12 May 2002 @ 1.51 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1018175400" format="1.0" version="1.51"}% d175 1 a175 1 | ="Web.Topic"= | A topic in another web, i.e. =%INCLUDE{"%TWIKIWEB%.SiteMap"}%= | d199 1 a199 1 | ="text"= | Search term. (Is a regular expression or literal, depending on the =regex= parameter) | required | d228 1 a228 1 | =title="Title"= | Text the is prepended to any search results | required | d351 1 a351 1 d354 1 a354 1 * The syntax for Preferences variables is the same anywhere in TWiki (on its own TWiki bullet line, including nested bullets):
[3 spaces] * [space] Set [space] VARIABLENAME [space] = [value]
__Examples:__ d360 1 a360 1 * You can add your own preference variables for an entire site, a single web, or a single topic, using the standard syntax. Whatever you include in your variable will be expanded on display, and treated exactly as if it had been written out. So you can place formatted text, page links, image paths. d362 4 a365 4
*Example: Create a custom logo variable*
* To place a logo anywhere in a web by typing ==%MYLOGO%==, simply define the variable on the web's WebPreferences page. You also have to upload =logo.gif= - this can be done by [[FileAttachment][attaching a file]] to =LogoTopic= (any topic name you choose): * ==Set MYLOGO = %PUBURL%/%MAINWEB%/LogoTopic/logo.gif== d369 1 a369 1 -- Main.MikeMannix - 07 Mar 2002 @ 1.50 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="1015559520" format="1.0" version="1.50"}% d175 1 a175 1 | ="Web.Topic"= | A topic in another web, i.e. =%INCLUDE{"%TWIKIWEB%.TWikiWebsTable"}%= | @ 1.49 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1013855830" format="1.0" version="1.49"}% d189 1 a189 1
d224 1 a224 1 ="parent"= if searcing for topics that have a specific parent i.e. its \ d228 1 a228 1 | =title="Title"= | Text the is pre-pended to any search results | required | d369 1 a369 1 -- Main.MikeMannix - 05 Jan 2002 @ 1.46 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="1007294280" format="1.0" version="1.46"}% d11 1 a11 1 TWikiVariables are text strings - =%VARIABLE%= - that expand into content whenever a page is opened. Variables are replaced by their actual values: stored data, or system info (like the date, or the current user). There are predefined variables, and Preference variables that you set. You can also define custom variables, with new names and values. d15 1 a15 1 Most predefined variables return values that were either defined when TWiki was installed, or taken from server info (like current username, or date and time). Many of the variables let you control how the formatted results appear. d17 3 a19 1 %WIKITOOLNAME% expands the following variables (enclosed in ==%== percent signs): d53 1 a53 1 d56 1 a56 1 d59 1 a59 1 d65 1 a65 1 d68 1 a68 1 d71 1 a71 1 d80 1 a80 1 d83 1 a83 1 d86 1 a86 1 d89 1 a89 1 d92 1 a92 1 d95 1 a95 1 d98 1 a98 1 d101 1 a101 1 d104 1 a104 1 d126 1 a126 1
=%URLPARAM{"name"}%= Returns the value of a URL parameter. Note that there is a risk that this variable could be misused for cross-scripting. Parameters are name, default and newline: d56 3 a58 1 Example: =%URLPARAM{"skin"}%= returns print for a =.../view/%WEB%/%TOPIC%?skin=print= URL. Is %URLPARAM{"skin"}% d61 7 a67 2 =%URLENCODE{"string"}%= Encodes a string for use as a URL parameter. Ex: =%URLENCODE{"spaced name"}%= returns %URLENCODE{"spaced name"}% Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in WikiSyntax (="---++ text"=) and HTML (="<h2>text</h2>"=) are taken into account. Any heading text after ="!!"= is excluded from the TOC; for example, write ="---+!! text"= if you do not want to list a header in the TOC. Parameters are topic name, web and depth: d217 2 a218 1 Examples: =%TOC{depth="2"}%=, =%TOC{"TWikiDocumentation" web="%TWIKIWEB%"}%= d407 2 a408 2 -- PeterThoeny - 19 Jan 2003
-- Main.MikeMannix - 12 May 2002 @ 1.70 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1067684884" format="1.0" version="1.70"}% d48 1 a48 1
Small 16x16 pixel icon of common attachment types, like =bmp=, =doc=, =gif=, =hlp=, =html=, =pdf=, =ppt=, =txt=, =wav=, =xml=, =zip=, etc. Specify file type only, file name, or full path name. Example: =%ICON{"pdf"}%= returns %ICON{"pdf"}% Returns the value of a URL parameter. Note that there is a risk that this variable could be misused for cross-scripting. Parameters are name and newline: d230 2 @ 1.67 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1061625101" format="1.0" version="1.67"}% d52 4 a55 3 | *Parameter:* | *Description:* | | ="name"= | The name of a URL parameter | | =newline="<br />"= | Convert newlines to other delimiters | @ 1.66 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1061617140" format="1.0" version="1.66"}% d191 1 @ 1.65 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1057016404" format="1.0" version="1.65"}% d51 6 a56 1 Returns the value of a URL parameter. Note that there is a low risk that this variable could be misused for cross-scripting. Ex: =%URLPARAM{"skin"}%= returns print for a =.../view/%WEB%/%TOPIC%?skin=print= URL. Is %URLPARAM{"skin"}% Server side include to IncludeTopicsAndWebPages. Parameters are page name, and an optional =pattern="(reg-exp)"=. The page name is: | ="SomeTopic"= | The name of a topic located in the current web, i.e. =%INCLUDE{"WebNotify"}%= | | ="Web.Topic"= | A topic in another web, i.e. =%INCLUDE{"%TWIKIWEB%.SiteMap"}%= | | ="http://..."= | A full qualified URL, i.e. =%INCLUDE{"http://twiki.org/"}%= | d219 1 a219 1 | ==header="..."==
==format="..."== | Custom format results: see *[[FormattedSearch]]* for usage, variables & examples | Results in table | @ 1.58 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1033867260" format="1.0" version="1.58"}% d202 1 a202 1 | ="text"= | Search term. (Is a regular expression or literal, depending on the =regex= parameter) [TWikiAlphaRelease - for regular expressions ";" can be used to mean _and_ e.g. "search;agrep" will find all topic containing search _and_ agrep ] | required | d208 1 a208 1 | =regex="on"= | RegularExpression search | Literal search | @ 1.57 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1030259897" format="1.0" version="1.57"}% d48 1 a48 1
Returns the value of a URL parameter. Ex: =%URLPARAM{"skin"}%= returns print for a =.../view/%WEB%/%TOPIC%?skin=print= URL. Is %URLPARAM{"skin"}% Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in WikiSyntax (="---++ text"=) and HTML (="<h2>text</h2>"=) are taken into account. (But not ="<H2>text</H2>"=, which can be used to exclude a heading from the TOC.) Parameters are topic name, web and depth: @ 1.54 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1021679280" format="1.0" version="1.54"}% d357 1 a357 1 * The syntax for Preferences Bariables is the same anywhere in TWiki (on its own TWiki bullet line, including nested bullets):
[3 spaces] * [space] Set [space] VARIABLENAME [space] = [value]
__Examples:__ @ 1.53 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1021445972" format="1.0" version="1.53"}% d36 1 a36 1
The public URL of TWiki, is %PUBURL% Table of Contents. Shows a TOC that is generated automatically based on headings of a topic. Headings in WikiSyntax (="---++ text"=) and HTML (="<h2>text<h2>"=) are taken into account. (But not ="<H2>text</H2>"=, which can be used to exclude a heading from the TOC.) Parameters are topic name, web and depth: d369 1 a369 1 -- Main.MikeMannix - 23 Jan 2002 @ 1.48 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="1011781320" format="1.0" version="1.48"}% d203 1 a203 1 | =order="topic"=
=order="modified"=
=order="editby"= | Sort the results of search by the topic names, last modified time, or last editor | Sort by topic name | @ 1.47 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="1010288700" format="1.0" version="1.47"}% d7 1 a7 3 _Text strings expanded on the fly to display data or system info_ ---++ Overview d213 4 a216 2 | ==format="..."== | Flexible custom result formatting: see *[[FormattedSearch]]* for usage | Results in table | Example: =%SEARCH{"wiki" web="%MAINWEB%" scope="topic"}%=
Name of wiki tool, is %WIKITOOLNAME% Wiki tool version is %WIKIVERSION% Your login username is %USERNAME% Your %WIKINAME% including the %MAINWEB% web name. Usefull for signatures. Is %WIKIUSERNAME% The Main web containing %MAINWEB%.%WIKIUSERSTOPIC%, %MAINWEB%.OfficeLocations and %MAINWEB%.TWikiGroups. Is %MAINWEB% The web containing all documentation and configuration of %WIKITOOLNAME% is %TWIKIWEB% The web name of the topic that includes the current topic. Same as =%WEB%= in case there is no include. The home topic in each web. Is [[%HOMETOPIC%]] The notify topic in each web. Is [[%NOTIFYTOPIC%]] The index topic of all registered users. Is %WIKIUSERSTOPIC% The web preferences topic. Is %WIKIPREFSTOPIC% The web preferences topic. Is %WEBPREFSTOPIC% The web statistics topic. Is %STATISTICSTOPIC% The current topic name, is %TOPIC% The name of the topic where the includes started, e.g. the first topic of nested includes. Same as =%TOPIC%= in case there is no include. Web index, e.g. list of all webs. Hidden webs are excluded, e.g. webs with a =NOSEARCHALL=on= preference variable. The ="format"= defines the format of one web item. The =$name= variable gets expanded to the name of the web, =$qname= gets expanded to double quoted name, =$marker= to =marker= where web matches =selection=. d239 1 a239 1 [2] __Note__: A web can be excluded from a =web="all"= search if you define a =NOSEARCHALL=on= variable in its %WEBPREFSTOPIC%. d354 3 a356 2 * The syntax for Preferences variables is the same anywhere in TWiki. In Edit mode, from the start of a new line:
[6 spaces] * [space] Set [space] VARIABLENAME [space] = [value]
__Example:__ * ==Set VARIABLENAME = value== d369 1 a369 1 -- MikeMannix - 30 Nov 2001 @ 1.45 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="1007115240" format="1.0" version="1.45"}% d19 1 a19 1 d213 1 a216 26 d244 1 a244 1
=%SEARCH{... format="..."}%= *Control the formatting of an embedded search.* By default, the search result display format is fixed: a table with rows of topic name and topic summary. Use the =format="..."= parameter to specify a custom format, typically, a bullet list or table row containing variables
Ex: =%SEARCH{ "food" format="| $topic | $summary |" }%=)
*Two paramters can be used to specify a customized search result:*
*1.* =header="..."= parameter
Use the header paramter to specify the header of a search result. It should correspond to the format of the format parameter. This parameter is optional. Ex: =header="| *Topic:* | *Summary:* |"=
*2.* =format="..."= parameter
*Use the format paramter to specify the format of one search hit.*
Ex: =format="| $topic | $summary |"=
*Variables that can be used in the format string:* | *Name:* | *Expands To:* | | =$web= | Name of the web | | =$topic= | Topic name | | =$locked= | LOCKED flag (if any) | | =$date= | Time stamp of last topic update | | =$rev= | Number of last topic revision, i.e. =1.4= | | =$wikiusername= | Wiki user name of last topic update, i.e. =%MAINWEB%.JohnSmith= | | =$summary= | Topic summary | | =$formfield(name)= | The field value of a form field, i.e. =$formfield(TopicClassification)= would get expanded to =PublicFAQ=. This applies only to topics that have a [[TWiki.TWikiForms][TWikiForm]] | | =$pattern(reg-exp)= | A regular expression pattern to extract some text from a topic, i.e. =$pattern(.*?\*.*?Email\:\s*([^\n\r]+).*)= extracts the email address from a bullet of format =* Email: ...=. | __Note:__ For =$pattern(reg-exp)=, specify a TWiki.RegularExpression that scans from start to end and contains the text you want to keep in parenthesis, ex: =$pattern(.*?(from here.*?to here).*)=. You need to make sure that the integrity of a web page is not compromised, i.e. if you include a table make sure to include everything including the table end tag.
*NOTE:* Sorting is nicely covered by the TWiki.TablePlugin.
__For how-to tips and tricks, see: TWikiVariablesExamples__
d355 1 a355 1 ---++ Customizing Variables d357 7 a363 1 __See:__ [[TWikiVariablesExamples][TWikiVariables Examples]] @ 1.44 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1003975824" format="1.0" version="1.44"}% d15 1 a15 1 With a couple of notable exceptions, predefined variables return set values that are defined on installation and left alone. Most are directory names and file paths, customized for your server, and only have to be updated once in the main configuration file if your server set-up changes. d208 2 a209 4 | =nosummary="on"= | Show topic title only. [3] | Show topic summary | | =bookview="on"= | BookView search, e.g. show complete topic text. [3] | Show topic summary. | | =format="..."= | Define a FormattedSearch, i.e.
=" * [[$topic]]: $summary"=. [3] | Show regular search result with topic summary | | =header="..."= | Specify header of FormattedSearch, i.e.
=" * *Topic: Summary:*"=. | Show regular header | d214 28 a241 1
a262 2 [3] __Note__: Regular search, no summary, BookView and FormattedSearch are exclusive. d380 1 a380 3 ---++ Creating Custom Variables * You can add your own preference variables for an entire site, a single web, or a single topic, using the standard syntax. Whatever you include in your variable will be expanded on display, and treated exactly as if it had been written out. So you can place formatted text, page links, image paths. d382 1 a382 5
*Example: Create a custom logo variable*
* To place a logo anywhere in a web by typing ==%MYLOGO%==, simply define the variable on the web's WebPreferences page. You also have to upload =logo.gif= - this can be done by [[FileAttachment][attaching a file]] to =LogoTopic= (any topic name you choose): * ==Set MYLOGO = %PUBURL%/%MAINWEB%/LogoTopic/logo.gif==
a383 1 -- MikeMannix - 30 Aug 2001
d385 1 @ 1.43 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="1000548079" format="1.0" version="1.43"}% d208 4 a211 2 | =nosummary="on"= | Show topic title only | Show topic summary | | =bookview="on"= | BookView search, e.g. show complete topic text | Show topic summary | d238 2 @ 1.42 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="1000447660" format="1.0" version="1.42"}% a2 2 %INCLUDE{"UtilTempDocNote"}% d7 1 a7 1 _Text strings expanded on the fly include predefined, preference-driven and custom-defined data_ d11 1 a11 1 TWikiVariables are text strings enclosed in percentage signs: ==%VARIABLE%== that represent stored data. When a topic is rendered for viewing, defined variables are replaced by their actual values. TWiki has two types of variable, predefined and Preference-based, where usually you determine the content. Through Preference variables, you can also define custom variables, creating new variable name and value. TWiki variables are as simple to use as they are powerful, and vice versa! d15 1 a15 1 With a couple of notable exceptions, predefined variables return set values that are defined one-time on installation and left alone. Most are directory names and file paths, customized for your server, and only have to be updated once in the main configuration file if your server set-up changes. d17 1 a17 1 %WIKITOOLNAME% expands the following variables enclosed in % percent signs: d19 1 a19 1
d87 4 a90 1 d242 1 a242 1
The index topic of all registered users. Is %WIKIUSERSTOPIC%
d357 1 a357 1
@ 1.41 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="JohnTalintyre" date="1000368971" format="1.0" version="1.41"}% d359 1 a359 1 * ==Set MYLOGO = %PUBURLPATH%/%MAINWEB%/LogoTopic/logo.gif== d363 1 @ 1.40 log @none @ text @d1 2 a2 1 %META:TOPICINFO{author="MikeMannix" date="1000280274" format="1.0" version="1.40"}% d44 1 a44 1
d118 3 a120 3
=%TOPICLIST{" * $web.$name"}%= creates a bullet list of all topics.
=%TOPICLIST{separator=", "}%= creates a comma separated list of all topics.
=%TOPICLIST{" <option>$name</option>"}%= creates an option list (for drop down menus). d131 2 a132 2 | =selection= | Current value e.g. current for current Web, =section="%WEB%" | Examples:
=%WEBLIST{" * [[$name.%HOMETOPIC%]]"}%= creates a bullet list of all webs. d151 1 a151 1 Variables can be shortened to 3 characters. Example:
=%GMTIME{"$day $month, $year - $hour:$min:$sec"}%= is
%GMTIME{"$day $month, $year - $hour:$min:$sec"}% d157 1 a157 1
d200 4 a203 4 | =web="Name"=
=web="%MAINWEB% Know"=
=web="all"= | Wiki web to search: A web, a list of webs separated by whitespace, or =all= webs. [2] | Current web | | =scope="topic"=
=scope="text"= | Search topic name (title) or in the text (body) of the topic | Topic text (body) | | =order="topic"=
=order="modified"=
=order="editby"= | Sort the results of search by the topic names, last modified time, or last editor | Sort by topic name | | =limit="all"=
=limit="16"= | Limit the number of results returned | All results | d210 1 a210 1 | =noheader="on"= | Suppress search header
*Topics: Changed: By:* | Show search header | d214 13 d349 1 a349 1 * The syntax for Preferences variables is the same anywhere in TWiki. In Edit mode, from the start of a new line:
[6 spaces] * [space] Set [space] VARIABLENAME [space] = [value]
__Example:__ d357 1 a357 1 *Example: Create a custom logo variable*
d362 1 a362 1 -- MikeMannix - 30 Aug 2001
@ 1.39 log @none @ text @d1 3 a3 1 %META:TOPICINFO{author="MikeMannix" date="999858969" format="1.0" version="1.39"}% @ 1.38 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="999839991" format="1.0" version="1.38"}% d4 5 a8 1 ---## TWiki Variables d12 1 a12 1 ---+++ Predefined Variables d221 1 a221 1 ---+++ Preferences Variables d331 1 a331 1 ---+++ Setting Preferences d336 1 a336 1 ---+++ Creating Custom Variables @ 1.37 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="999315578" format="1.0" version="1.37"}% d337 2 a338 2 HOW-TO: Create a custom logo variable
To place a logo anywhere in a web by typing ==%MYLOGO%==, simply define the variable on the web's WebPreferences page. In this case, you also have to upload ==logo.gif== to the same directory.: @ 1.36 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="999237983" format="1.0" version="1.36"}% d6 1 a6 1 TWikiVariables are text strings enclosed in percentage signs: ==%VARIABLE%== that represent stored data. When a topic is rendered for viewing, defined variables replaced by their actual values. TWiki has two types of variable, predefined, and Preference-based, where you can change settings. Through Preference variables, you can even define custom variables. Clearly, they are a power TWiki feature. d10 2 d14 3 a16 2
The attachment URL of the current topic, is %ATTACHURL%
Example: If you attach a file you can refer to it as =%ATTACHURL%/image.gif=
Formatted server time.
Example: =%SERVERTIME{"$hou:$min"}%= is %SERVERTIME{"$hou:$min"}%
a208 1 d211 1 d215 1 d221 3 a223 2
Variable: Expanded to:
d326 2 a327 1 ---+++ Setting Variable Preferences d334 7 a340 2 * You can add your own preference variables for an entire site, a single web, or a single topic, using the standard syntax. Whatever you include in your variable will be expanded on display, and treated exactly as if it had been written out. So you can place formatted text, page links, image paths.
__Example:__ To place a logo anywhere in a web by typing ==%MYLOGO%==, define the variable in the web's WebPreferences topic, like this (in this case, you also have to upload ==logo.gif== to the same directory): * ==Set MYLOGO = %PUBURLPATH%/%MAINWEB%/LogoTopic/logo.gif== @ 1.35 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="999187591" format="1.0" version="1.35"}% a4 2 ---+++ About Variables @ 1.34 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="999182965" format="1.0" version="1.34"}% d8 1 a8 1 __Include/write if not found elsewhere.__ d27 1 a27 1 d42 1 a42 1 d48 1 a48 1 d51 1 a51 1 d63 1 a63 1 d66 1 a66 1 d323 1 a323 2 ---+++ Setting and Creating New Preferences d327 4 a330 1 * You can add your own preference variables for an entire site, a single web, or a single topic, using the standard syntax. Whatever you include in your variable will be expanded on display, and treated exactly as if it had been written out. So you can place formatted text, page links, images.
__Example:__ To place a logo anywhere in a web by typing ==%MYLOGO%==, define the variable in the web's WebPreferences topic, like this (in this case, you also have to upload ==logo.gif== to the same directory): d333 1 a333 1 -- MikeMannix - 26 Aug 2001
@ 1.33 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="999044161" format="1.0" version="1.33"}% @ 1.32 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="998886670" format="1.0" version="1.32"}% d6 4 d324 1 a324 1 __Notes:__ d326 4 a329 4 * Preferences variables ( on site-level, web-level and user level ) are defined by bullet lines with this syntax: * =Set VARIABLENAME = value= * Additional preferences variables can be defined on all three level as needed. Example: * =Set MYLOGO = %PUBURLPATH%/%MAINWEB%/LogoTopic/logo.gif= a330 1 -- PeterThoeny - 23 Jul 2001
@ 1.31 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="MikeMannix" date="998863709" format="1.0" version="1.31"}% d328 1 a328 1 -- Main.MikeMannix - 26 Aug 2001
@ 1.30 log @none @ text @d1 3 a3 1 %META:TOPICINFO{author="PeterThoeny" date="997885781" format="1.0beta2" version="1.30"}% d173 1 a173 1
d176 1 a176 1 d296 17 @ 1.27 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="995164458" format="1.0beta2" version="1.27"}% d53 6 d68 15 d302 1 a302 1 -- PeterThoeny - 14 Jul 2001
@ 1.26 log @none @ text @d1 1 a1 1 %META:TOPICINFO{version="1.26" date="994871489" author="PeterThoeny" format="1.0beta2"}% d75 7 a81 1 @ 1.24 log @none @ text @d114 6 a119 2 d141 1 a141 1 | =web="Name"=
=web="%MAINWEB% Know"=
=web="all"= | Wiki web to search: A web, a list of webs separated by whitespace, or all webs =[2]= | Current web | d255 1 a255 1 -- PeterThoeny - 24 Mar 2001
@ 1.23 log @none @ text @d70 10 @ 1.22 log @none @ text @d34 3 @ 1.21 log @none @ text @d121 1 a121 1 d144 2 d235 1 a235 1 -- %MAINWEB%.PeterThoeny - 01 Mar 2001
@ 1.19 log @none @ text @d106 10 d229 1 a229 1 -- %MAINWEB%.PeterThoeny - 19 Jan 2001
@ 1.18 log @none @ text @d45 6 d54 6 d67 11 a77 1 d83 1 a83 1 @ 1.17 log @none @ text @d97 1 a97 1 | =noheader="on"= | Suppress search header
Topics: Changed: By: | Show search header | d197 1 a197 1 -- %MAINWEB%.PeterThoeny - 10 Nov 2000
@ 1.16 log @none @ text @d78 6 @ 1.15 log @none @ text @d91 1 @ 1.14 log @none @ text @d15 3 @ 1.13 log @none @ text @d37 1 a37 1 d96 1 a96 1 [1] __Note__: A web can be excluded from a =web="all"= search if you define a =NOSEARCHALL=on= variable in its WebPreferences. @ 1.12 log @none @ text @d1 1 a1 1 TWiki expands the following variables enclosed in % percent signs: d7 1 a7 1 d10 1 a10 1 d13 1 a13 1 d19 1 a19 1 d73 1 a73 1 d78 1 a78 1 | =web="Name"=
=web="Main Know"=
=web="all"= | Wiki web to search: A web, a list of webs separated by whitespace, or all webs =[1]= | Current web | d89 1 a89 1 Example: =%SEARCH{"wiki" web="Main" scope="topic"}%= d92 1 a92 1 d158 20 d187 1 a187 1 -- Main.PeterThoeny - 01 Nov 2000
@ 1.11 log @none @ text @d90 4 d160 8 a167 1 -- Main.PeterThoeny - 18 Sep 2000
@ 1.10 log @none @ text @d123 8 d149 1 a149 1 @ 1.9 log @none @ text @d45 3 d148 1 a148 1 -- Main.PeterThoeny - 17 Aug 2000
@ 1.8 log @none @ text @d69 2 a70 2 d75 4 a78 2 | =web="Name"= | Specify Wiki web to search | Current web | | =scope="topic"= | Search topic name (title) | Topic text (body) | d80 1 d83 1 d89 2 d116 4 d131 12 d145 1 a145 1 -- Main.PeterThoeny - 29 May 2000
@ 1.7 log @none @ text @d37 1 a37 1 d45 5 a49 2 d51 5 a55 2 d85 1 a85 1 Additional variables are defined in the preferences ( site-level ( __SL__ ) in %MAINWEB%.%WIKIPREFSTOPIC%, web-level ( __WL__ ) in %WEBPREFSTOPIC% of each web, and user level ( __UL__ ) preferences in individual user topics): @ 1.6 log @none @ text @d46 4 a49 1 d117 1 a117 1 -- Main.PeterThoeny - 21 Apr 2000
@ 1.5 log @none @ text @d7 1 a7 1 d48 12 d113 2 @ 1.4 log @none @ text @d96 4 @ 1.3 log @none @ text @d10 4 a13 1 d16 4 a19 1 d23 3 @ 1.2 log @none @ text @a17 3 d53 34 @ 1.1 log @none @ text @d42 14 a55 2 @
Variable: Level: What: The script suffix, i.e. =.pl=, is %SCRIPTSUFFIX% Returns the value of a URL parameter. I.e. =%URLPARAM{"skin"}%= returns print for a =.../view/%WEB%/%TOPIC%?skin=print= URL. Is %URLPARAM{"skin"}% Wiki tool version, is %WIKIVERSION% Your login username, is %USERNAME% The web containing all documentation and configuration of %WIKITOOLNAME%. Is %TWIKIWEB% The current web, is %WEB% Table of Content of current topic. Table of Content. Shows a TOC that is generated automatically based on headings of a topic. Headings in WikiSyntax (="---++ text"=) and HTML (="<h2>text<h2>"=) are taken into account. (But not ="<H2>text<H2>"=, which can be used to exclude a heading from the TOC.) Parameters are topic name, web and depth: d328 1 @ 1.29 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="JohnTalintyre" date="997197916" format="1.0beta2" version="1.29"}% d174 1 a174 1 Table of Content. Shows a TOC that is generated automatically based on headings of a topic. Headings in WikiSyntax (="---++ text"=) and HTML (="<h2>text<h2>"=) are taken into account. Parameters are topic name, web and depth: @ 1.28 log @none @ text @d1 1 a1 1 %META:TOPICINFO{author="PeterThoeny" date="995873452" format="1.0beta2" version="1.28"}% d109 1 a109 1 Web index, e.g. list of all webs. Hidden webs are excluded, e.g. webs with a =NOSEARCHALL=on= preference variable. The ="format"= defines the format of one web item. The =$name= variable gets expanded to the name of the web. d115 7 a121 1 Example:
=%WEBLIST{" * [[$name.%HOMETOPIC%]]"}%= creates a bullet list of all webs.
Topic index of a web. Parameter is composed of the format, followed by an optional =web="Name"=. The ="format"= defines the format of one topic item; use it to create any formatting you need. The =$name= variable is expanded to the topic name; the =$web= variable is expanded to the name of the web. d84 1 d88 6 a93 1 Web index, e.g. list of all webs. Hidden webs are excluded, e.g. webs with a =NOSEARCHALL=on= preference variable. The ="format"= defines the format of one web item. The =$name= variable is expanded to the name of the web. d131 1 a131 1 Server side include to IncludeTopicsAndWebPages. The parameter is composed of the page name, followed by an optional =pattern="(reg-exp)"= pair. The page name is: d147 3 a149 2 Table of Content. Shows a TOC that is generated automatically based on headings of a topic. Headings in WikiSyntax (="---++ text"=) and HTML (="<h2>text<h2>"=) are taken into account. Parameter is composed of the topic name, followed by optional =name="value"= pairs: | *Pair:* | *Description:* | *Default:* | d154 5 a158 4 =%SEARCH{"str" ...}%= Inline search, shows a search result embedded in a topic. Parameter is composed of the search term (enclosed in double quotes), followed by optional =name="value"= pairs: [1] | *Pair:* | *Description:* | *Default:* | | =search="food"= | Search term, (either regex or literal, depending on the =regex= parameter) | (used if initial search term is missing) | d229 8 d281 1 a281 1 -- PeterThoeny - 25 Jun 2001
@ 1.25 log @none @ text @d1 1 d47 3 d51 1 a51 1
Your Wiki username, if defined in %MAINWEB%.%WIKIUSERSTOPIC%. Same as %USERNAME% if not defined. Is %WIKIUSERNAME% =%INCLUDE{"SomeTopic"}%= Server side include, includes another topic. The current Wiki web is searched by default. Example: =%INCLUDE{"%TWIKIWEB%.TWikiWebsTable"}%= Inline search, shows a search result embedded in a topic. Parameter is composed of the search string, followed by optional =name="value"= pairs: d123 2 a124 1 | =web="Name"=
=web="%MAINWEB% Know"=
=web="all"= | Wiki web to search: A web, a list of webs separated by whitespace, or all webs =[1]= | Current web | d143 3 a145 1 [1] __Note__: A web can be excluded from a =web="all"= search if you define a =NOSEARCHALL=on= variable in its %WEBPREFSTOPIC%. d238 1 a238 1 -- PeterThoeny - 15 Mar 2001
@ 1.20 log @none @ text @d1 4 d138 1 a138 1
Get a preference value from another web then the current one. Example: To get =%WEBBGCOLOR%= of the %MAINWEB% web write =%VAR{"WEBBGCOLOR" web="%MAINWEB%"}%=, is =%VAR{"WEBBGCOLOR" web="%MAINWEB%"}%= Formatted GM time based on keywords (first three characters needed.)
Example: =%GMTIME{"day month, year - hour:min:sec"}%= is %GMTIME{"day month, year - hour:min:sec"}%
Formatted server time. Example: =%SERVERTIME{"hou:min"}%= is %SERVERTIME{"hou:min"}% Your Wiki username, if defined in %MAINWEB%.TWikiUsers. Same as %USERNAME% if not defined. Is %WIKIUSERNAME% The base script URL of TWiki, link of Home icon in upper left corner, is %WIKIHOMEURL% The script URL of TWiki, is %SCRIPTURL% The path of the script URL of TWiki, is %SCRIPTURLPATH% The path of the public URL of TWiki, is %PUBURLPATH% Server side include, includes another topic. The current Wiki web is searched by default. Example: =%INCLUDE{"TWiki.TWikiWebsTable"}%= Get a preference value from another web then the current one. Example: To get =%WEBBGCOLOR%= of the Main web write =%VAR{"WEBBGCOLOR" web="Main"}%=, is =%VAR{"WEBBGCOLOR" web="Main"}%= http-equiv meta tags for edit script.
=%INCLUDE{"file.ext"}%= Server side include, includes the text of a file. The default directory is the current Wiki web. Example: =%INCLUDE{"../Know/TopicName.txt"}%= Your Wiki username, if defined in TWikiUsers. Same as %USERNAME% if not defined. Is %WIKIUSERNAME% =%DATE%= Todays date (local server time), is %DATE% =%GMTIME%= Todays date (GM time), is %GMTIME% Todays date, is %DATE% The base script URL of TWiki, link of Home icon in upper left corner is %WIKIHOMEURL% The base script URL of TWiki, is %SCRIPTURL% The base public URL of TWiki, is %PUBURL% =%WIKIWEBMASTER%= The email address of the Wiki webmaster, is %WIKIWEBMASTER%
=%INCLUDE:"file.ext"%= Server side include, includes the text of a file. The default directory is the current Wiki web. Example: =%INCLUDE:"../Know/TopicName.txt"%=