diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-01-18 19:27:59 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-01-18 19:27:59 +0000 |
commit | 3c6da7d518bd03a5c09d19fbe3fa57e400cec1a7 (patch) | |
tree | 34d2398d24f62097dfac64d6afc29f75d8146177 /doc/todo | |
parent | 1dd63278478379fc706ceccea1a6893421de2210 (diff) |
web commit by JoshTriplett
Diffstat (limited to 'doc/todo')
-rw-r--r-- | doc/todo/conditional_text_based_on_ikiwiki_features.mdwn | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/todo/conditional_text_based_on_ikiwiki_features.mdwn b/doc/todo/conditional_text_based_on_ikiwiki_features.mdwn new file mode 100644 index 000000000..3cefc97a2 --- /dev/null +++ b/doc/todo/conditional_text_based_on_ikiwiki_features.mdwn @@ -0,0 +1,16 @@ +I'd like to see some way to conditionally include wiki text based on whether the wiki enables or disables certain features. For example, [[helponformatting]], could use `\[[if (enabled smiley) """Also, because this wiki has the smiley plugin enabled, you can insert \[[smileys]] and some other useful symbols."""]]`, and a standard template for [[plugins]] pages could check for the given plugin name to print "enabled" or "disabled". + +Some potentially useful conditionals: + +* `enabled pluginname` +* `disabled pluginname` +* `any pagespec`: true if any of the pages in the [[PageSpec]] exist +* `all pagespec`: true if all of the pages in the [[PageSpec]] exist +* `no pagespec` or `none pagespec`: true if none of the pages in the [[PageSpec]] exist +* `thispage pagespec`: true if pagespec includes the page getting rendered (possibly one including the page with this content on it). +* `sourcepage pagespec`: true if pagespec includes the page corresponding to the file actually containing this content, rather than a page including it. +* `included`: true if included on another page, via [[plugins/inline]], [[plugins/sidebar]], [[plugins/contrib/navbar]], etc. + +You may or may not want to include boolean operations (`and`, `or`, and `not`); if you do, you could replace `disabled` with `not enabled`, and `no pagespec` or `none pagespec` with `not any pagespec` (but you may want to keep the aliases for simplicity anyway). You also may or may not want to include an `else` clause; if so, you could label the text used if true as `then`. + +Syntax could vary greatly here, both for the [[PreprocessorDirective]] and for the condition itself. |