Skins
WikiDX output is controlled by a powerful skinning engine. This allows the content to be displayed in any number of ways. I have tried to keep the content seperate from the display, allowing greater freedom to the skin author.
Fields
| Field | Description |
|---|---|
<!--{IF $<var> <op> <value>}-->
| Checks var against a value, ie if a = 1. See operators |
<!--{IFDEF $<var>}-->
| Checks the variable exists and has a non-blank value |
<!--{IFNDEF $<var>}-->
| Checks the variable either doesnot exist or is blank / null |
<!--{ENDIF}-->
| Ends the IF statement. |
<!--{FOREACH $<array>}-->
| Loop through the contents of array. The array must follow this structure |
<!--{ENDFOREACH}-->
| End the foreach statement |
<!--{INCLUDE <file>}-->
| Contents of file are included into the template processing |
<!--{CALL <func>}-->
| Call a function. The return value of the function is displayed. The CALL keyword is optional |
<!--{INCLUDEPAGE <wikipage>}-->
| Include the content of another wiki page. Content is run through wiki engine and is fully formatted |
<!--{$<var>}-->
| Simply show the content of $TPParms['<var>'] |
Operators
| Operator | Description |
|---|---|
| =, eq | Equal to |
| !=, ne | Not equal to |
| <, lt | Less than |
| >, gt | Greater than |
| <= | Less than or equal to |
| >= | Greater than or equal to |
| in | value matches at least one of a list of values, ie <!--{IF $ACT in ('edit', 'diff')}-->
|
| not in | values does not match any in a list (see above) |
Examples
Simple IF test. If the value of $TPParms['ACT'] is edit, then the text 'some code' is issued.<!--{IF $ACT = "edit"}--> some test <!--{ENDIF}-->
or
<!--{IF $ACT eq "edit"}--> some test <!--{ENDIF}-->
If $TPParms['ACT'] exists and contains non blank contents, then show text
<!--{IFDEF $ACT}--> some test <!--{ENDIF}-->