1 I often find myself wrapping the same boiler plate around [[ikiwiki/directives/img]] img directives, so I tried to encapsulate it using the following [[ikiwiki/directives/template]]:
5 [\[!img <TMPL_VAR raw_href>
6 size="<TMPL_VAR raw_size>"
9 alt="<TMPL_VAR raw_alt>"
12 alt="<TMPL_VAR raw_alt>"
20 <p><TMPL_VAR raw_caption></p>
24 The result, even with htmlscrubber disabled, is mangled, something like
27 <span class="createlink"><a href="http://jmtd.net/cgi?
28 page=size&from=log0.000000old_new_test&do=create"
29 rel="nofollow">?</a>size</span>
33 Any suggestions gladly received. -- [[Jon]]
35 > Well, you *should* be able to do things like this, and in my testing, I
36 > *can*. I used your exact example above (removing the backslash escape)
38 > \[[!template id=test href=himom.png size=100x]]
40 > And got just what you would expect.
42 > I don't know what went wrong for you, but I don't see a bug here.
43 > My guess, at the moment, is that you didn't specify the required href
44 > and size parameters when using the template. If I leave those off,
45 > I of course reproduce what you reported, since the img directive gets
46 > called with no filename, and so assumes the size parameter is the image
47 > to display.. [[done]]? --[[Joey]]