| IF Statements
The %IF% construct gives TWiki the power to include content in topics based on the value of simple expressions. |
|
allows |
'X' allows 'Y' is true if web/topic 'X' exists and allows access mode 'Y' for the current user. Web access rights are only checked if there is no topic called 'X'. |
istopic |
istopic 'X' is true if topic 'X' exists |
isweb |
isweb 'X' is true if web 'X' exists |
|
|
< < |
ingroup |
'X' ingroup 'Y' is true if user 'X' is in group 'Y' |
|
> > |
ingroup |
'X' ingroup 'Y' is true if user 'X' is in group 'Y'. 'X' can be a login name or a wikiname. |
|
|
defined |
True if a preference variable or url parameter of this name is defined. |
$ |
expands a URL parameter or TWikiVariable name. Plugin handlers are not called. Built-in variables and user-defined preferences are supported. You can pass a limited subset of parameters to TWiki variables by enclosing the variable name in single quotes; for example, $ 'VARIABLE{value}' . The 'VARIABLE{value}' string may not contain quotes (' or "). |
{X} |
expands to the value of the configuration variable {X} - for example, {ScriptUrlPath} |
|
|
1. TWiki variable defined or not |
|
< < | WIKINAME is defined |
> > | WIKINAME is defined |
|
2. Compare TWiki variable |
|
< < | You are not allowed to |
> > | You are not allowed to |
| edit this TWiki today.
3. URL parameter |
|
< < | No search passed in |
> > | No search passed in |
|
4. Range test on URL parameter |
| Context identifiers are used in TWiki to label various stages of the rendering process. They are especially useful for skin authors to find out where they are in the rendering process. The following context identifiers are available:
id |
context |
absolute_urls |
Set if absolute URLs are required |
|
|
> > |
|
|
authenticated |
a user is authenticated |
body_text |
when the body text is being processed in a view (useful in plugin handlers) |
can_login |
current environment supports login |
|
|
header_text |
when the header text is being processed in a view (useful in plugin handlers) |
i18n_enabled |
when user interface I18N support is enabled (i.e., user can choose the language for UI) |
inactive |
if active links such as 'edit' and 'attach' should be disabled |
|
|
> > |
|
|
mirror |
if this is a mirror |
new_topic |
if the topic doesn't already exist |
oops |
in oops script (see TWikiScripts) |
preview |
in preview script (see TWikiScripts) |
|
|
> > |
|
|
|
|
> > |
|
|
textareas_hijacked |
provided for use by editors that highjack textareas, and want to signal this fact. This is used by skins, for example, so they can suppress extra controls when textareas have been hijacked. |
|
|
> > |
|
|
|
|
> > |
|
|
rest |
in rest script (see TWikiScripts) |
registration_supported |
registration is supported by the current UserMapper? |
registration_enabled |
set if {Register}{EnableNewUserRegistration} is on, and registrationis supported |
|