Tags:
view all tags
---++ TWiki Variables Quickstart %STARTINCLUDE% TWiki Variables are names that are enclosed in percent signs =%= that are expanded on the fly. Some variables take arguments, such as =%<nop>INCLUDE%=. For those variables, the arguments are included in curly braces ({ and }). | *Variable* | *In brief* | *Full documentation* | | =%<nop>TOC%= | Automatically generates a table of contents based on headings in a topic - see the top of this page for an example. |VarTOC | | =%<nop>WEB%= | The current web, is <b><nop>%WEB%</b>. | VarWEB | | =%<nop>TOPIC%= | The current topic name, is <b>%BASETOPIC%</b>. <!-- using BASETOPIC instead of TOPIC for the example because this document is normally included in TextFormattingRules --> | VarTOPIC | | =%<nop>ATTACHURL%= | The attachment URL of the current topic. Example usage: If you attach a file to a topic you can refer to it as =<b>%<nop>ATTACHURL%/image.gif</b>= to show the URL of the file or the image in your text. | VarATTACHURL | | =%<nop>INCLUDE{"SomeTopic"}%= | Server side include, includes another topic. The current web is the default web. Example: =<b>%<nop>INCLUDE{"%TWIKIWEB%.SiteMap"}%</b>= | VarINCLUDE | | =%<nop>SEARCH{"sushi"}%= | Inline search showing the search result embedded in a topic. FormattedSearch gives you control over formatting, useful for creating web-based applications. | VarSEARCH | TWikiPreferences defines some site-wide variables. Among them are: * *Line break:* Write =%<nop>BR%= to start a new line. * *Colored text:* Write: =%<nop>RED% Red %<nop>ENDCOLOR% and %<nop>BLUE% blue %<nop>ENDCOLOR% colors= to get: %RED% Red %ENDCOLOR% and %BLUE% blue %ENDCOLOR% colors. There are many more variables. To see them all, go to *[[TWikiVariables]]*. *Documentation Graphics:* There are many graphics available to use in your topics. Use =%<nop>ICON{"help"}%=, =%<nop>ICON{"tip"|%=, and =%<nop>icon{"warning"}%= to get: %H%, %T%, and %X%. To see all of the graphics available, see TWikiDocGraphics. %ICON{"tip"}% To "escape" a variable, prefix it with an exclamation mark. Write: =!%<nop>SOMEVARIABLE%= to get: !%SOMEVARIABLE%. %STOPINCLUDE%
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r8
|
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
More topic actions...
Topic revision: r1 - 2006-03-14
-
TWikiContributor
Home
Site map
Main web
Sandbox web
TWiki web
TWiki Web
User registration
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Log In
Register User
Edit
Attach
Copyright © 1999-2025 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.TWikiVariablesQuickStart
.