Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
IF StatementsThe%IF% construct gives TWiki the power to include content in topics based on the value of simple expressions. | ||||||||
Line: 17 to 17 | ||||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
| ||||||||
Line: 87 to 88 | ||||||||
expands to: You are a normal user | ||||||||
Added: | ||||||||
> > | 11. Hide section of text conditionally using CSS visibility
<div style="visibility: %IF{"'%USERNAME%' ingroup 'TWikiAdminGroup'" then="visible" else="hidden"}%"> * Conditional text enclosed in div tags here... * ...can be as long as needed </div>Above text is only shown to users who are in the TWikiAdminGroup. | |||||||
Configuration items are defined in configure. You cannot see the value of a configuration item, you can only see if the item is set or not. 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: | ||||||||
Line: 131 to 141 | ||||||||
The %IF% statement is deliberately kept simple. In particular, note that there is no way to conditionally execute a Set statement. If you need more sophisticated control over formatting, then consider using the SpreadSheetPlugin.
Note also that while the query syntax can be used to access form fields, there are some contexts in which an IF statement may be used where there is no topic context, or the topic context is not what you expected. | ||||||||
Added: | ||||||||
> > | Related Topics: QuerySearch, VarIF, VarSEARCH, FormattedSearch -- Contributors: TWiki:Main/ArthurClemens, TWiki:Main/CrawfordCurrie, TWiki:Main/PeterThoeny, TWiki:Main/SopanShewale, TWiki:Main/SvenDowideit, TWiki:Main/WillNorris - 2010-04-09 |