]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/shortcut_optional_parameters.mdwn
web commit by http://jcflack.myopenid.com/
[ikiwiki.git] / doc / todo / shortcut_optional_parameters.mdwn
index 494aac98a5f9945805d081dda9ae7c850e74c184..daec3696a05119e06dbb23d5af4b2387f3779449 100644 (file)
@@ -22,3 +22,25 @@ Some possible syntax choices for the shortcut definition:
     \[[shortcut name=debfiles url="http://packages.debian.org/cgi-bin/search_contents.pl?word=$*&searchmode=filelist&case=insensitive&version=${dist=unstable}&arch=${arch=i386}"]]
 
 --[[JoshTriplett]]
+
+Well, you can already do this kind of thing with templates. Invocation does
+look different:
+
+    \[[template id=debfiles package=ikiwiki dist=testing]]
+
+--[[Joey]]
+
+> I think I would find templates sufficient, if:
+>
+> 1. I could use the name of the template as a preprocessor directive
+>    (`\[[templatename ...]]`), rather than using the `template` directive
+>    with an `id` argument (`\[[template id=templatename]]`).
+> 2. Template invocation allowed bare values in addition to `key=value`
+>    arguments, and template definition supported some means to access the
+>    value.  This would allow `\[[debfiles ikiwiki]]` rather than
+>    `\[[debfiles package=ikiwiki]]`.
+> 3. I could use ikiwiki syntax in the template, not just HTML and
+>    HTML::Template.  (If I can already do that, then [[/plugins/template]]
+>    should make that more clear.)
+>
+> --[[JoshTriplett]]