<<O>>  Cambios es la página TWikiVariables (r1.67 - 13 Oct 2005 - RicardoDeLosSantos)

META TOPICPARENT WebHome
Changed:
<
<
__Si tu nivel de inglés lo permite, te agradeceríamos que editaras esta página y tradujeras algún párrafo. No debes traducir las palabras que aparecen entre símbolos de % ni las que corresponden a código HTML.__ Si tienes dudas , contacta con webmaster@omeriqueQUITAESTO.net *
>
>
Si tu nivel de inglés lo permite, te agradeceríamos que editaras esta página y tradujeras algún párrafo. No debes traducir las palabras que aparecen entre símbolos de % ni las que corresponden a código HTML. Si tienes dudas , contacta con webmaster@omeriqueQUITAESTO.net

TOC: No TOC in "TWiki.TWikiVariables"

 <<O>>  Cambios es la página TWikiVariables (r1.66 - 03 Oct 2005 - ManuelRobles)

META TOPICPARENT WebHome
Changed:
<
<
Si tu nivel de inglés lo permite, te agradeceríamos que editaras esta página y tradujeras algún párrafo. No debes traducir las palabras que aparecen entre símbolos de % ni las que corresponden a código HTML. Si tienes dudas , contacta con webmaster@omeriqueQUITAESTO.net
>
>
__Si tu nivel de inglés lo permite, te agradeceríamos que editaras esta página y tradujeras algún párrafo. No debes traducir las palabras que aparecen entre símbolos de % ni las que corresponden a código HTML.__ Si tienes dudas , contacta con webmaster@omeriqueQUITAESTO.net *

TOC: No TOC in "TWiki.TWikiVariables"

Line: 67 to 67

%WIKIUSERNAME% Your %WIKINAME% including the Main web name - always use full signatures - Main.VisitanteTWiki
Changed:
<
<
%MAINWEB%
>
>
* *
%MAINWEB%

The web containing TWikiUsers, OfficeLocations and TWikiGroups is Main
%TWIKIWEB%
 <<O>>  Cambios es la página TWikiVariables (r1.65 - 18 May 2005 - MercedesAlvarez)

META TOPICPARENT WebHome
Si tu nivel de inglés lo permite, te agradeceríamos que editaras esta página y tradujeras algún párrafo. No debes traducir las palabras que aparecen entre símbolos de % ni las que corresponden a código HTML. Si tienes dudas , contacta con webmaster@omeriqueQUITAESTO.net
 <<O>>  Cambios es la página TWikiVariables (r1.64 - 09 Jul 2004 - RicardoDeLosSantos)

META TOPICPARENT WebHome
Si tu nivel de inglés lo permite, te agradeceríamos que editaras esta página y tradujeras algún párrafo. No debes traducir las palabras que aparecen entre símbolos de % ni las que corresponden a código HTML. Si tienes dudas , contacta con webmaster@omeriqueQUITAESTO.net
 <<O>>  Cambios es la página TWikiVariables (r1.63 - 08 Jul 2004 - Main.ricardo)

META TOPICPARENT WebHome
Added:
>
>
Si tu nivel de inglés lo permite, te agradeceríamos que editaras esta página y tradujeras algún párrafo. No debes traducir las palabras que aparecen entre símbolos de % ni las que corresponden a código HTML. Si tienes dudas , contacta con webmaster@omeriqueQUITAESTO.net

TWiki Variables

 <<O>>  Cambios es la página TWikiVariables (r1.62 - 27 Jan 2003 - PeterThoeny)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 246 to 246

[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):

 <<O>>  Cambios es la página TWikiVariables (r1.61 - 19 Jan 2003 - PeterThoeny)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 218 to 218

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
Regular example: %SEARCH{"wiki" web="Main" scope="topic"}%
Changed:
<
<
Formatted example: %SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="| $topic | $summary |"% (displays results in a table with header - details)
>
>
Formatted example: %SEARCH{"FAQ" scope="topic" nosearch="on" nototal="on" header="| *Topic: * | *Summary: * |" format="| $topic | $summary |"% (displays results in a table with header - details)
HELP 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%" }%

Line: 376 to 377

    • Set MYLOGO = %PUBURL%/TWiki/LogoTopic/mylogo.gif
Changed:
<
<
-- PeterThoeny - 13 Sep 2001
>
>
-- PeterThoeny - 19 Jan 2003

-- MikeMannix - 12 May 2002
 <<O>>  Cambios es la página TWikiVariables (r1.60 - 11 Dec 2002 - PeterThoeny)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 173 to 173

REMOTE_USER environment variable, is
%INCLUDE{"page" ...}%
Changed:
<
<
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{"TWiki.SiteMap"}%
"http://..." A full qualified URL, i.e. %INCLUDE{"http://twiki.org/"}%
>
>
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{"TWiki.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

%STARTINCLUDE%
Line: 213 to 216

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
Changed:
<
<
header="..."
format="..."
Custom format results: see FormattedSearch for usage, variables & examples Results in table
>
>
header="..."
format="..."
Custom format results: see FormattedSearch for usage, variables & examples Results in table

Regular example: %SEARCH{"wiki" web="Main" 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 - details)
 <<O>>  Cambios es la página TWikiVariables (r1.59 - 23 Nov 2002 - PeterThoeny)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 199 to 199

%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:
Changed:
<
<
"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
>
>
"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

search="text" (Alternative to above) N/A
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"
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
Changed:
<
<
regex="on" RegularExpression search Literal search
>
>
regex="on" RegularExpression search; also enables ";" as and 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
 <<O>>  Cambios es la página TWikiVariables (r1.58 - 06 Oct 2002 - PeterThoeny)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 45 to 45

The path of the attachment URL of the current topic, is /twiki/pub/TWiki/TWikiVariables
%URLPARAM{"name"}%
Changed:
<
<
Returns the value of a URL parameter. Ex: %URLPARAM{"skin"}% returns print for a .../view/TWiki/TWikiVariables?skin=print URL. Is
>
>
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/TWiki/TWikiVariables?skin=print URL. Is

%URLENCODE{"string"}% Encodes a string for use as a URL parameter. Ex: %URLENCODE{"spaced name"}% returns spaced%20name
Line: 351 to 351

SL , WL List of preferences that are not allowed to be overridden by next level preferences
Added:
>
>

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 HELP Help icon.

Setting Preferences

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

 <<O>>  Cambios es la página TWikiVariables (r1.57 - 25 Aug 2002 - PeterThoeny)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 135 to 135

selection="%WEB%" Current value to be selected in list section="%WEB%"
Examples:
%WEBLIST{"   * [[$name.WebHome]]"}% creates a bullet list of all webs.
Changed:
<
<
%WEBLIST{"" webs="Trash,public" selection="TWiki" separator=" "}% Dropdown of all public Webs + Trash Web, current Web highlighted.
>
>
%WEBLIST{"<option $marker value=$qname>$name</option>" webs="Trash,public" selection="TWiki" separator=" "}% Dropdown of all public Webs + Trash Web, current Web highlighted.

%GMTIME%
 <<O>>  Cambios es la página TWikiVariables (r1.56 - 05 Jun 2002 - PeterThoeny)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 189 to 189

Table of Contents of current topic.
%TOC{"SomeTopic" ...}%
Changed:
<
<
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:
>
>
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:

Parameter: Description: Default:
"TopicName" topic name Current topic
web="Name" Name of web Current web
 <<O>>  Cambios es la página TWikiVariables (r1.55 - 24 May 2002 - PeterThoeny)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 354 to 354

Setting Preferences

Changed:
<
<
  • 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:
>
>
  • 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=
 <<O>>  Cambios es la página TWikiVariables (r1.54 - 17 May 2002 - PeterThoeny)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 33 to 33

The script suffix, ex: .pl, .cgi is
%PUBURL%
Changed:
<
<
The public URL of TWiki, is http://www.omerique.net/twiki/pub
>
>
The public URL of TWiki, is http://www.omerique.net/twiki/pub
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 Omerique, is /twiki/pub
Line: 47 to 47

%URLPARAM{"name"}% Returns the value of a URL parameter. Ex: %URLPARAM{"skin"}% returns print for a .../view/TWiki/TWikiVariables?skin=print URL. Is
Added:
>
>
%URLENCODE{"string"}% Encodes a string for use as a URL parameter. Ex: %URLENCODE{"spaced name"}% returns spaced%20name

%WIKITOOLNAME% The name of your TWiki site - Omerique
 <<O>>  Cambios es la página TWikiVariables (r1.53 - 15 May 2002 - PeterThoeny)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 172 to 172

%INCLUDE{"page" ...}% 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"}%
Changed:
<
<
"Web.Topic" A topic in another web, i.e. %INCLUDE{"TWiki.TWikiSiteMap"}%
>
>
"Web.Topic" A topic in another web, i.e. %INCLUDE{"TWiki.SiteMap"}%

"http://..." A full qualified URL, i.e. %INCLUDE{"http://twiki.org/"}%
 <<O>>  Cambios es la página TWikiVariables (r1.52 - 12 May 2002 - MikeMannix)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 172 to 172

%INCLUDE{"page" ...}% 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"}%
Changed:
<
<
"Web.Topic" A topic in another web, i.e. %INCLUDE{"TWiki.SiteMap"}%
>
>
"Web.Topic" A topic in another web, i.e. %INCLUDE{"TWiki.TWikiSiteMap"}%

"http://..." A full qualified URL, i.e. %INCLUDE{"http://twiki.org/"}%
Line: 196 to 196

%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:
Changed:
<
<
"text" Search term. (Is a regular expression or literal, depending on the regex parameter) required
>
>
"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

search="text" (Alternative to above) N/A
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)
Line: 225 to 225

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
Changed:
<
<
title="Title" Text the is prepended to any search results 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: "}%
Line: 348 to 348

SL , WL List of preferences that are not allowed to be overridden by next level preferences
Changed:
<
<
>
>

Setting Preferences

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

  • Set VARIABLENAME = =value=
    • 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.
>
>
  • You can add your own Preference Variables for us across an entire site or a single web, using the standard 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.

Changed:
<
<
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 = %PUBURL%/%MAINWEB%/LogoTopic/logo.gif
>
>
Example: Create a custom logo variable the TWiki 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 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

-- PeterThoeny - 13 Sep 2001

Changed:
<
<
-- MikeMannix - 07 Mar 2002
>
>
-- MikeMannix - 12 May 2002
 <<O>>  Cambios es la página TWikiVariables (r1.51 - 07 Apr 2002 - PeterThoeny)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 172 to 172

%INCLUDE{"page" ...}% 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"}%
Changed:
<
<
"Web.Topic" A topic in another web, i.e. %INCLUDE{"TWiki.TWikiWebsTable"}%
>
>
"Web.Topic" A topic in another web, i.e. %INCLUDE{"TWiki.SiteMap"}%

"http://..." A full qualified URL, i.e. %INCLUDE{"http://twiki.org/"}%
 <<O>>  Cambios es la página TWikiVariables (r1.50 - 08 Mar 2002 - MikeMannix)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 186 to 186

Table of Contents of current topic.
%TOC{"SomeTopic" ...}%
Changed:
<
<
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:
>
>
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:

Parameter: Description: Default:
"TopicName" topic name Current topic
web="Name" Name of web Current web
Line: 366 to 366

-- PeterThoeny - 13 Sep 2001

Changed:
<
<
-- MikeMannix - 23 Jan 2002
>
>
-- MikeMannix - 07 Mar 2002
 <<O>>  Cambios es la página TWikiVariables (r1.49 - 16 Feb 2002 - PeterThoeny)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 200 to 200

search="text" (Alternative to above) N/A
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)
Changed:
<
<
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
>
>
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
regex="on" RegularExpression search Literal search
reverse="on" Reverse the direction of the search Ascending search
 <<O>>  Cambios es la página TWikiVariables (r1.48 - 23 Jan 2002 - MikeMannix)

META TOPICPARENT WebHome

TWiki Variables

Changed:
<
<
Text strings expanded on the fly to display data or system info

Overview

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

Line: 212 to 210

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
Changed:
<
<
format="..." Flexible custom result formatting: see FormattedSearch for usage Results in table
Example: %SEARCH{"wiki" web="Main" scope="topic"}%
>
>
header="..."
format="..."
Custom format results: see FormattedSearch for usage, variables & examples Results in table
Regular example: %SEARCH{"wiki" web="Main" 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 - details)

%METASEARCH{...}%
Line: 221 to 221

Parameter: Description: Default:
| type="topicmoved" | What sort of search is required?
"topicmoved" if search for a topic that may have been moved
Changed:
<
<
"parent" if searcing for topics that have a specific parent i.e. its
>
>
"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
Changed:
<
<
title="Title" Text the is pre-pended to any search results required
>
>
title="Title" Text the 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: "}%
Line: 366 to 366

-- PeterThoeny - 13 Sep 2001

Changed:
<
<
-- MikeMannix - 05 Jan 2002
>
>
-- MikeMannix - 23 Jan 2002
 <<O>>  Cambios es la página TWikiVariables (r1.47 - 06 Jan 2002 - MikeMannix)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 8 to 8

Overview

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

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

Changed:
<
<
Omerique expands the following variables (enclosed in % percent signs):
>
>
  • TIP 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 - 04 Sep 2004 $Rev: 1742 $ - expands the following variables (enclosed in % percent signs):


Line: 48 to 50

Returns the value of a URL parameter. Ex: %URLPARAM{"skin"}% returns print for a .../view/TWiki/TWikiVariables?skin=print URL. Is
%WIKITOOLNAME%
Changed:
<
<
Name of wiki tool, is Omerique
>
>
The name of your TWiki site - Omerique

%WIKIVERSION%
Changed:
<
<
Wiki tool version is 04 Sep 2004 $Rev: 1742 $
>
>
Your current TWiki version - 04 Sep 2004 $Rev: 1742 $

%USERNAME%
Changed:
<
<
Your login username is VisitanteTWiki
>
>
Your login username - VisitanteTWiki

%WIKINAME% Your Wiki username. Same as %USERNAME% if not defined in the TWikiUsers topic. Is VisitanteTWiki
%WIKIUSERNAME%
Changed:
<
<
Your %WIKINAME% including the Main web name. Usefull for signatures. Is Main.VisitanteTWiki
>
>
Your %WIKINAME% including the Main web name - always use full signatures - Main.VisitanteTWiki

%MAINWEB%
Changed:
<
<
The Main web containing TWikiUsers, OfficeLocations and TWikiGroups. Is Main
>
>
The web containing TWikiUsers, OfficeLocations and TWikiGroups is Main

%TWIKIWEB%
Changed:
<
<
The web containing all documentation and configuration of Omerique is TWiki
>
>
The web containing all documentation and site-wide preference settings for Omerique - TWiki

%WEB% The current web is TWiki
Line: 75 to 77

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%
Changed:
<
<
The web name of the topic that includes the current topic. Same as %WEB% in case there is no include.
>
>
The web name of the topic that includes the current topic - same as %WEB% if there is no INCLUDE.

%HOMETOPIC%
Changed:
<
<
The home topic in each web. Is WebHome
>
>
The home topic in each web - WebHome

%NOTIFYTOPIC%
Changed:
<
<
The notify topic in each web. Is WebNotify
>
>
The notify topic in each web - WebNotify

%WIKIUSERSTOPIC%
Changed:
<
<
The index topic of all registered users. Is TWikiUsers
>
>
The index topic of all registered users - TWikiUsers

%WIKIPREFSTOPIC%
Changed:
<
<
The web preferences topic. Is TWikiPreferences
>
>
The site-wide preferences topic - TWikiPreferences

%WEBPREFSTOPIC%
Changed:
<
<
The web preferences topic. Is WebPreferences
>
>
The local web preferences topic in each web - WebPreferences

%STATISTICSTOPIC%
Changed:
<
<
The web statistics topic. Is WebStatistics
>
>
The web statistics topic WebStatistics

%TOPIC%
Changed:
<
<
The current topic name, is TWikiVariables
>
>
The current topic name - TWikiVariables

%BASETOPIC%
Changed:
<
<
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.
>
>
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.
Line: 121 to 123


%TOPICLIST{" <option>$name</option>"}% creates an option list (for drop down menus).
%WEBLIST{"format"}%
Changed:
<
<
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.
>
>
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"
Line: 234 to 236

[1] Note: The search form uses identical names for input fields.
Changed:
<
<
[2] Note: A web can be excluded from a web="all" search if you define a NOSEARCHALL=on variable in its WebPreferences.
>
>
[2] Note: A web can be excluded from a web="all" search if you define a NOSEARCHALL=on variable in its WebPreferences.

Preferences Variables

Line: 349 to 351

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:
    • Set VARIABLENAME = value
>
>
  • 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=

Creating Custom Variables

Line: 363 to 366

-- PeterThoeny - 13 Sep 2001

Changed:
<
<
-- MikeMannix - 30 Nov 2001
>
>
-- MikeMannix - 05 Jan 2002
 <<O>>  Cambios es la página TWikiVariables (r1.46 - 02 Dec 2001 - MikeMannix)

META TOPICPARENT WebHome
TOC: No TOC in "TWiki.TWikiVariables"
Line: 16 to 16

Omerique expands the following variables (enclosed in % percent signs):

Changed:
<
<
>
>

Variable: Expanded to:
Line: 210 to 210

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
Added:
>
>
format="..." Flexible custom result formatting: see FormattedSearch for usage Results in table

Example: %SEARCH{"wiki" web="Main" scope="topic"}%
Deleted:
<
<
%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. Main.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 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 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 TablePlugin.
For how-to tips and tricks, see: TWikiVariablesExamples?

%METASEARCH{...}% Special search of meta data
Parameter: Description: Default:
Line: 266 to 241

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:
Line: 377 to 352

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

Customizing Variables

>
>

Creating Custom Variables


Changed:
<
<
See: TWikiVariables Examples?
>
>
  • 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: 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 = %PUBURL%/%MAINWEB%/LogoTopic/logo.gif

--