]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/todo/conditional_text_based_on_ikiwiki_features.mdwn
* Patch and 2 considerations for inline sorting
[git.ikiwiki.info.git] / doc / todo / conditional_text_based_on_ikiwiki_features.mdwn
index 4b984cf5a1200fa083dbe0b55af75d213c6e35da..17585af65b5c190df77f91a1cfa563f28fefd602 100644 (file)
@@ -1,6 +1,6 @@
 I'd like to see some way to conditionally include wiki text based on
 whether the wiki enables or disables certain features.  For example,
 I'd like to see some way to conditionally include wiki text based on
 whether the wiki enables or disables certain features.  For example,
-[[ikiwiki/formatting]], could use `\[[if (enabled smiley) """Also, because
+[[ikiwiki/formatting]], 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
 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
@@ -25,7 +25,7 @@ include an `else` clause; if so, you could label the text used if true as
 `then`.
 
 Syntax could vary greatly here, both for the
 `then`.
 
 Syntax could vary greatly here, both for the
-[[ikiwiki/PreprocessorDirective]] and for the condition itself.
+[[ikiwiki/Directive]] and for the condition itself.
 
 > I think this is a good thing to consider, although conditionals tend to
 > make everything a lot more complicated, so I also want to KISS, and not
 
 > I think this is a good thing to consider, although conditionals tend to
 > make everything a lot more complicated, so I also want to KISS, and not
@@ -52,12 +52,12 @@ Syntax could vary greatly here, both for the
 > As to the syntax, to fit it into standard preprocessor syntax, it would
 > need to look something like this:
 >
 > As to the syntax, to fit it into standard preprocessor syntax, it would
 > need to look something like this:
 >
->      \[[if test="enabled(smiley)" """foo"""]]
+>      \[[!if test="enabled(smiley)" """foo"""]]
 > 
 > --[[Joey]]
 
 >> [[ikiwiki/PageSpec]] syntax seems perfect, and your proposed syntax for the `if`
 > 
 > --[[Joey]]
 
 >> [[ikiwiki/PageSpec]] syntax seems perfect, and your proposed syntax for the `if`
->> [[ikiwiki/PreprocessorDirective]] looks fine to me.
+>> [[ikiwiki/Directive]] looks fine to me.
 >>
 >> [[ikiwiki/PageSpec]]s don't give you `none` for free, since `!foo/*` as a boolean
 >> would mean "does any page not matching `foo/*` exist", not "does `foo/*`
 >>
 >> [[ikiwiki/PageSpec]]s don't give you `none` for free, since `!foo/*` as a boolean
 >> would mean "does any page not matching `foo/*` exist", not "does `foo/*`
@@ -70,7 +70,7 @@ Syntax could vary greatly here, both for the
 >>
 >> A few use cases for `included`, which I would really like to see:
 >>
 >>
 >> A few use cases for `included`, which I would really like to see:
 >>
->> * On the sidebar page, you could say something like \[[if test="!included"
+>> * On the sidebar page, you could say something like \[[!if test="!included"
 >>   """This page, without this help message, appears as a sidebar on all
 >>   pages."""]].  The help text would then only appear on the sidebar page
 >>   itself, not the sidebar included on all pages.
 >>   """This page, without this help message, appears as a sidebar on all
 >>   pages."""]].  The help text would then only appear on the sidebar page
 >>   itself, not the sidebar included on all pages.
@@ -110,7 +110,7 @@ This is now completely [[todo/done]]! See [[plugins/conditional]].
 Is there a way to test features other than plugins? For example,
 to add to [[ikiwiki/Markdown]] something like
 
 Is there a way to test features other than plugins? For example,
 to add to [[ikiwiki/Markdown]] something like
 
-    \[[if test="enabled(multimarkdown)" then="You can also use..."]]
+    \[[!if test="enabled(multimarkdown)" then="You can also use..."]]
 
 (I tried it like that just to see if it would work, but I wasn't that lucky.)
 --ChapmanFlack
 
 (I tried it like that just to see if it would work, but I wasn't that lucky.)
 --ChapmanFlack
@@ -119,3 +119,10 @@ to add to [[ikiwiki/Markdown]] something like
 > page for multimarkdown is a path to madness or unreadability though.
 > Perhaps it would be better to have .mmdwn files that can only contain
 > multimarkdown? --[[Joey]]
 > page for multimarkdown is a path to madness or unreadability though.
 > Perhaps it would be better to have .mmdwn files that can only contain
 > multimarkdown? --[[Joey]]
+
+>> Really, there was only one (or maybe two) pages I had in mind as appropriate
+>> places for conditional text based on multimarkdown—the underlay pages
+>> for 'markdown' and maybe also 'formatting', because those are the pages you
+>> look at when you're trying to find out how to mark stuff up for the wiki, so
+>> if MM is enabled, they need to at least mention it and have a link to the
+>> MM syntax guide.--ChapmanFlack