## TWiki Variables Quickstart TWiki Variables are names that are enclosed in percent signs `%` that are expanded on the fly. Some variables take arguments, such as `%INCLUDE%`. For those variables, the arguments are included in curly braces (\{ and \}).
Variable | In brief | Full documentation |
---|---|---|
%TOC% |
Automatically generates a table of contents based on headings in a topic - see the top of this page for an example. | [[Main/VarTOC]] |
%WEB% |
The current web, is %WEB%. | [[Main/VarWEB]] |
%TOPIC% |
The current topic name, is WebHome. | [[Main/VarTOPIC]] |
%ATTACHURL% |
The attachment URL of the current topic. Example usage: If you attach a file to a topic you can refer to it as %ATTACHURL%/image.gif to show the URL of the file or the image in your text. |
[[Main/VarATTACHURL]] |
%INCLUDE{"SomeTopic"}% |
Server side include, includes another topic. The current web is the default web. Example: %INCLUDE{"TWiki.SiteMap"}% |
[[Main/VarINCLUDE]] |
%SEARCH{"sushi"}% |
Inline search showing the search result embedded in a topic. [[Main/FormattedSearch]] gives you control over formatting, useful for creating web-based applications. | [[Main/VarSEARCH]] |