Документ взят из кэша поисковой машины. Адрес оригинального документа : http://dualopt1.cmm.msu.ru/bin/rdiff/TWiki/TWikiVariables?rev1=41&rev2=37
Дата изменения: Unknown
Дата индексирования: Sun Apr 10 12:49:38 2016
Кодировка:
%TOPICTITLE% (37 vs. 41) - TWiki
Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...
View   r41  >  r40  >  r39  >  r38  >  r37  ...
TWikiVariables 41 - 2001-09-13 - JohnTalintyre
Line: 1 to 1
Added:
>
>
META TOPICPARENT name="WebHome"
 

Warning: Can't find topic TWiki.UtilTempDocNote

Line: 40 to 41
 
The path of the public URL of TWiki, is /pub
%ATTACHURL%
Changed:
<
<
The attachment URL of the current topic, is http://dualopt1.cmm.msu.ru/pub/TWiki/TWikiVariables
Example: If you attach a file you can refer to it as %ATTACHURL%/image.gif
>
>
The attachment URL of the current topic, is http://dualopt1.cmm.msu.ru/pub/TWiki/TWikiVariables
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 /pub/TWiki/TWikiVariables
Line: 114 to 115
 
separator=", " line separator "\n" (new line)
web="Name" Name of web Current web
Examples:
Changed:
<
<

%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).
>
>

%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, 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.
Line: 127 to 128
 
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"
Changed:
<
<
selection Current value e.g. current for current Web, =section="%WEB%"
Examples:
%WEBLIST{"   * [[$name.WebHome]]"}% creates a bullet list of all webs.
>
>
selection="%WEB%" Current value to be selected in list section="%WEB%"
Examples:
%WEBLIST{"   * [[$name.WebHome]]"}% creates a bullet list of all webs.
 
%WEBLIST{"" webs="Trash,public" selection="TWiki" separator=" "}% Dropdown of all public Webs + Trash Web, current Web highlighted.
Line: 147 to 148
 
$mo 2 digit month 12
$year 4 digit year 1999
$ye 2 digit year 99
Changed:
<
<
Variables can be shortened to 3 characters. Example:
%GMTIME{"$day $month, $year - $hour:$min:$sec"}% is
10 Apr, 2016 - 09:49:38
>
>
Variables can be shortened to 3 characters. Example:
%GMTIME{"$day $month, $year - $hour:$min:$sec"}% is
10 Apr, 2016 - 09:49:38
 
%SERVERTIME% Server time, is 2016-04-10 - 12:49
%SERVERTIME{"format"}%
Changed:
<
<
Formatted server time.
Example: %SERVERTIME{"$hou:$min"}% is 12:49
>
>
Formatted server time.
Example: %SERVERTIME{"$hou:$min"}% is 12:49
 
%HTTP_HOST% HTTP_HOST environment variable, is dualopt1.cmm.msu.ru
Line: 196 to 197
 
Parameter: Description: Default:
"text" Search term. (Is a regular expression or literal, depending on the regex parameter) required
search="text" (Alternative to above) N/A
Changed:
<
<
web="Name"
web="Main 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
>
>
web="Name"
web="Main 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
 
regex="on" RegularExpression search Literal search
reverse="on" Reverse the direction of the search Ascending search
casesensitive="on" Case sensitive search Ignore case
nosummary="on" Show topic title only Show topic summary
bookview="on" BookView search, e.g. show complete topic text Show topic summary
nosearch="on" Suppress search string Show search string
Changed:
<
<
noheader="on" Suppress search header
Topics: Changed: By:
Show search header
>
>
noheader="on" Suppress search header
Topics: Changed: By:
Show search header
 
nototal="on" Do not show number of topics found Show number
Example: %SEARCH{"wiki" web="Main" scope="topic"}%
Added:
>
>
%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 searcing 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 the is pre-pended 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 Main web write %VAR{"WEBBGCOLOR" web="Main"}%, is #FFEFA6
Line: 332 to 346
 

Setting Preferences

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

Line: 340 to 354
 
  • 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.

Changed:
<
<
Example: Create a custom logo variable
>
>
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 attaching a file to LogoTopic (any topic name you choose):
    • Set MYLOGO = %PUBURLPATH%/%MAINWEB%/LogoTopic/logo.gif
Changed:
<
<
-- MikeMannix - 30 Aug 2001
>
>
-- MikeMannix - 30 Aug 2001

TWikiVariables 40 - 2001-09-12 - MikeMannix
Line: 1 to 1
Added:
>
>

Warning: Can't find topic TWiki.UtilTempDocNote

 

TWiki Variables


TWikiVariables 39 - 2001-09-07 - MikeMannix
Line: 1 to 1
 
Changed:
<
<

TWiki Variables

>
>

TWiki Variables

Text strings expanded on the fly include predefined, preference-driven and custom-defined data

Overview

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

Predefined Variables

>
>

Predefined Variables

  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.
Line: 214 to 218
 [2] Note: A web can be excluded from a web="all" search if you define a NOSEARCHALL=on variable in its WebPreferences.
Changed:
<
<

Preferences Variables

>
>

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):
Line: 324 to 328
 
List of preferences that are not allowed to be overridden by next level preferences
Changed:
<
<

Setting 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
Changed:
<
<

Creating Custom Variables

>
>

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.

TWikiVariables 38 - 2001-09-07 - MikeMannix
Line: 1 to 1
 
On this page:

TWiki Variables

Line: 334 to 334
 
  • 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.

Changed:
<
<
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.:
>
>
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 attaching a file to LogoTopic (any topic name you choose):
 
    • Set MYLOGO = %PUBURLPATH%/%MAINWEB%/LogoTopic/logo.gif

Revision 41r41 - 2001-09-13 - 08:16:11 - JohnTalintyre
Revision 40r40 - 2001-09-12 - 07:37:54 - MikeMannix
Revision 39r39 - 2001-09-07 - 10:36:09 - MikeMannix
Revision 38r38 - 2001-09-07 - 05:19:51 - MikeMannix
Revision 37r37 - 2001-09-01 - 03:39:38 - 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