This is an old revision of the document!
Table of Contents
structcondstyle Plugin
Compatible with DokuWiki
- 2024-02-06 "Kaos" unknown
- 2023-04-04 "Jack Jackrum" unknown
- 2022-07-31 "Igor" unknown
- 2020-07-29 "Hogfather" yes
Similar to structrowcolor
Installation
External requirements: This plugin requires the following additional plugin that must be installed separately:
- the struct plugin
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Syntax
The plugin adds a new keyword to the definition of struct aggregations (see Struct Plugin: Aggregation), which allows the user to add a style to the rendered table, depending on specific column values. The syntax idea is simple: the keyword condstyle: is followed by a ternary operator, specifying the condition and the the styles related to the condition being true or false:
Basic syntax:
---- struct table---- schema: schema1 cols: * condstyle: COLUMN NAME = ARGUMENT ? "STYLE TRUE" : "STYLE FALSE" ---- The conditional part (// COLUMN = ARGUMENT//) compares the current row's value in the //COLUMN// to the argument, using a (boolean) operator. If the condition is true, the //STYLE TRUE// will be applied to the row, otherwise the //STYLE FALSE// will be applied. The style are plain CSS code (multiple statements, each ended with a semicolon) and have to be allways wrapped within quotation marks. Currently, the following operators are recognized: ^ Operator ^ Description ^ Works for... ^ | = | Row value has to be equal to the argument | text, dates, decimal | | != / not | Row value has to be not equal to the argument | text, dates, decimal | | < | Row value has to be less than the argument | dates, decimal | | > | Row value has to be greater than the argument | dates, decimal | | <= | Row value has to be less than or equal to the argument | dates, decimal | | >= | Row value has to be greater than or equal to the argument | dates, decimal | | contains | Row value has to contain the argument | text, dates, decimal |
Configuration and Settings
[also CSS style tips]
Development
[downloadable blocks, development comments]
Change Log
[preferable GitHub RSS feed or similar]
- 2009-01-01
- Initial release
Known Bugs and Issues
[this section might not be needed in case of external bug manager, or use RSS feed]
ToDo/Wish List
[developers roadmap]
FAQ
[discussions should ideally be deleted and turned into FAQ entries along the way]
Discussion
Could be placed on an external page (e.g. plugin:pluginname:discussion) to have a distinction between user comments and author docs