]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/else_parameter_for_map_plugin.mdwn
response
[ikiwiki.git] / doc / todo / else_parameter_for_map_plugin.mdwn
index 2afebd6089cf9d56fd3bc2ff2fb21f1d040c99e0..50fe3935739b156602746056ab514d8393643ea1 100644 (file)
@@ -25,3 +25,23 @@ documentation yet, I'm waiting for feedback first, but I'll do it for sure. -- [
        """ else="no pages"]]
 
 --[[Joey]]
+
+>>> I'm not convinced: the syntax you're proposing implies to duplicate
+>>> the pagespec (once in the test clause, and once in the map query), which I find
+>>> not only inelegant, which I can live with, but also tiring and unpractical:
+>>> my `else` suggestion
+>>> finds its roots in map queries with rather long pagespecs. On the other
+>>> hand, if I'm the only one using map in such a way, I can live with this
+>>> heavy duplicated syntax without bloating the map plugin with features
+>>> no-one but me needs. On the other other hand, the patch is a 3-liner.
+>>> I'm not fixed yet, I'll think about it. --[[intrigeri]]
+
+>>>> Write a [[plugins/template]] which accepts a pagespec and an
+>>>> "else" clause, and then you won't have to duplicate the
+>>>> pagespec. --[[JoshTriplett]]
+
+>>>> Yeah, the patch is obviously very simple. My problem with it really is
+>>>> that there would seem to be several other places in ikiwiki where
+>>>> someone might want to be able to handle an "else" case where a
+>>>> pagespec expands to nothing. And adding else cases for all of them
+>>>> could be a bit much. --[[Joey]]