Difference: TWikiVariables (40 vs. 41)

Revision 4113 Sep 2001 - 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 /twiki/pub
%ATTACHURL%
Changed:
<
<
The attachment URL of the current topic, is http://www.twiki.ufba.br/twiki/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://www.twiki.ufba.br/twiki/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 /twiki/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
28 Mar, 2024 - 17:12:14
>
>
Variables can be shortened to 3 characters. Example:
%GMTIME{"$day $month, $year - $hour:$min:$sec"}% is
28 Mar, 2024 - 17:12:14
 
%SERVERTIME% Server time, is 28 Mar 2024 - 14:12
%SERVERTIME{"format"}%
Changed:
<
<
Formatted server time.
Example: %SERVERTIME{"$hou:$min"}% is 14:12
>
>
Formatted server time.
Example: %SERVERTIME{"$hou:$min"}% is 14:12
 
%HTTP_HOST% HTTP_HOST environment variable, is www.twiki.ufba.br
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:
<-- -->
Sorted ascending
Description: Default:
title="Title" Text the is pre-pended to any search results required
topic="%TOPIC%" The topic the search relates to required
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
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
 
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