Документ взят из кэша поисковой машины. Адрес оригинального документа : http://dualopt1.cmm.msu.ru/bin/rdiff/TWiki/TWikiVariables?rev1=37&rev2=33
Дата изменения: Unknown
Дата индексирования: Fri Feb 28 22:49:48 2014
Кодировка:
%TOPICTITLE% (33 vs. 37) - TWiki
Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...
View   r37  >  r36  >  r35  >  r34  >  r33  ...
TWikiVariables 37 - 2001-09-01 - MikeMannix
Line: 1 to 1
 
On this page:

TWiki Variables

Changed:
<
<
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.
>
>
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!
 

Predefined Variables

Added:
>
>
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.
 TWiki expands the following variables enclosed in % percent signs:
Changed:
<
<
Variable: Expanded to:
>
>
Variable: Expanded to:
 
%WIKIHOMEURL% The base script URL of TWiki, is the link of the Home icon in the upper left corner, is /bin/view
Line: 203 to 206
 
%VAR{"NAME" web="Web"}% Get a preference value from a web other then the current one. Example: To get %WEBBGCOLOR% of the Main web write %VAR{"WEBBGCOLOR" web="Main"}%, is #FFEFA6
Deleted:
<
<
 
Added:
>
>
 [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 WebPreferences.

Added:
>
>
 

Preferences Variables

Additional variables are defined in the preferences ( site-level ( SL ) in TWikiPreferences, web-level ( WL ) in WebPreferences of each web, and user level ( UL ) preferences in individual user topics):

Changed:
<
<
Variable: Level: What:
>
>
Variable: Level: What:
 
%WIKIWEBMASTER% SL
Line: 318 to 323
 
SL , WL List of preferences that are not allowed to be overridden by next level preferences
Changed:
<
<

Setting Variable Preferences

>
>

Setting Preferences

 
  • 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

Creating Custom Variables

Changed:
<
<
  • 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):
>
>
  • 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.

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.:
 
    • Set MYLOGO = %PUBURLPATH%/%MAINWEB%/LogoTopic/logo.gif
Added:
>
>
  -- MikeMannix - 30 Aug 2001

TWikiVariables 36 - 2001-08-31 - MikeMannix
Line: 1 to 1
 
On this page:

TWiki Variables

Deleted:
<
<

About Variables

 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.

Predefined Variables


TWikiVariables 35 - 2001-08-30 - MikeMannix
Line: 1 to 1
 

TWiki Variables

About Variables

Changed:
<
<
Include/write if not found elsewhere.
>
>
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.
 

Predefined Variables

Line: 24 to 24
 
The path of the script URL of TWiki, is /bin
%SCRIPTSUFFIX%
Changed:
<
<
The script suffix, i.e. .pl, is
>
>
The script suffix, ex: .pl, .cgi is
 
%PUBURL% The public URL of TWiki, is http://dualopt1.cmm.msu.ru/pub
Line: 39 to 39
 
The path of the attachment URL of the current topic, is /pub/TWiki/TWikiVariables
%URLPARAM{"name"}%
Changed:
<
<
Returns the value of a URL parameter. I.e. %URLPARAM{"skin"}% returns print for a .../view/TWiki/TWikiVariables?skin=print URL. Is kubrick.nat,nat, pattern
>
>
Returns the value of a URL parameter. Ex: %URLPARAM{"skin"}% returns print for a .../view/TWiki/TWikiVariables?skin=print URL. Is kubrick.nat,nat, pattern
 
%WIKITOOLNAME% Name of wiki tool, is TWiki
%WIKIVERSION%
Changed:
<
<
Wiki tool version, is TWiki-4.3.2, Wed, 02 Sep 2009, build 18148
>
>
Wiki tool version is TWiki-4.3.2, Wed, 02 Sep 2009, build 18148
 
%USERNAME%
Changed:
<
<
Your login username, is guest
>
>
Your login username is guest
 
%WIKINAME% Your Wiki username. Same as %USERNAME% if not defined in the TWikiUsers topic. Is TWikiGuest
Line: 60 to 60
 
The Main web containing TWikiUsers, OfficeLocations and TWikiGroups. Is Main
%TWIKIWEB%
Changed:
<
<
The web containing all documentation and configuration of TWiki. Is TWiki
>
>
The web containing all documentation and configuration of TWiki is TWiki
 
%WEB%
Changed:
<
<
The current web, is TWiki
>
>
The current web is TWiki
 
%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.
Line: 320 to 320
 
SL , WL List of preferences that are not allowed to be overridden by next level preferences
Changed:
<
<

Setting and Creating New Preferences

>
>

Setting Variable Preferences

 
  • 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
Changed:
<
<
  • 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):
>
>

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.
    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
Changed:
<
<
-- MikeMannix - 26 Aug 2001
>
>
-- MikeMannix - 30 Aug 2001

TWikiVariables 34 - 2001-08-30 - MikeMannix
Line: 1 to 1
 
On this page:

TWiki Variables


Revision 37r37 - 2001-09-01 - 03:39:38 - MikeMannix
Revision 36r36 - 2001-08-31 - 06:06:23 - MikeMannix
Revision 35r35 - 2001-08-30 - 16:06:31 - MikeMannix
Revision 34r34 - 2001-08-30 - 14:49:25 - MikeMannix
Revision 33r33 - 2001-08-29 - 00:16:01 - MikeMannix
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiVariables
Syndicate this site RSSATOM