3 [[plugins/map]] (and I) could benefit from a bonus parameter:
5 else="Display this if no page matches the PageSpec"
7 This was quite simple, so I implemented this (branch "map" in my
8 ikiwiki repo, see my user page for the up-to-date URL). Not patched the
9 documentation yet, I'm waiting for feedback first, but I'll do it for sure. -- [[intrigeri]]
11 > Can't a [[plugins/conditional]] be for this?
14 >> Hmmm, what do you mean? Adding a syntax such as the one below?
17 \[[if test="map(" then="..." else="..."]]
19 >> What would you write in the `then` clause?
20 >> I'm not opposed at all to rewrite my two-liner, but I don't understand.
23 \[[if test="foo/*" then="""
29 >>> I'm not convinced: the syntax you're proposing implies to duplicate
30 >>> the pagespec (once in the test clause, and once in the map query), which I find
31 >>> not only inelegant, which I can live with, but also tiring and unpractical:
32 >>> my `else` suggestion
33 >>> finds its roots in map queries with rather long pagespecs. On the other
34 >>> hand, if I'm the only one using map in such a way, I can live with this
35 >>> heavy duplicated syntax without bloating the map plugin with features
36 >>> no-one but me needs. On the other other hand, the patch is a 3-liner.
37 >>> I'm not fixed yet, I'll think about it. --[[intrigeri]]