The path of the public URL of The Caboteria, is /wiki/pub
%ATTACHURL%
Changed:
< <
The attachment URL of the current topic, is http://caboteria.org/wiki/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://caboteria.org/wiki/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 /wiki/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 01 May, 2025 - 00:22:17
> >
Variables can be shortened to 3 characters. Example: %GMTIME{"$day $month, $year - $hour:$min:$sec"}% is 01 May, 2025 - 00:22:17
%SERVERTIME%
Server time, is 30 Apr 2025 - 20:22
%SERVERTIME{"format"}%
Changed:
< <
Formatted server time. Example: %SERVERTIME{"$hou:$min"}% is 20:22
> >
Formatted server time. Example: %SERVERTIME{"$hou:$min"}% is 20:22
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