summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-09-13 17:11:33 -0400
committerJoey Hess <joey@kitenet.net>2010-09-13 17:11:33 -0400
commitd7cd669470a5c8a920032baac6665bfc8eb4bd5b (patch)
tree601d05160546929c20af13128fd1353d9f92aec2
parenta4b4b464d27490d3868e8430a6f833b54a625cad (diff)
parent8e8b011c1a64cc15b08e0e61f1bb85eede1e3318 (diff)
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
-rw-r--r--doc/bugs/can__39__t_mix_template_vars_inside_directives.mdwn33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/bugs/can__39__t_mix_template_vars_inside_directives.mdwn b/doc/bugs/can__39__t_mix_template_vars_inside_directives.mdwn
new file mode 100644
index 000000000..0fa85effb
--- /dev/null
+++ b/doc/bugs/can__39__t_mix_template_vars_inside_directives.mdwn
@@ -0,0 +1,33 @@
+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]]:
+
+
+ <div class="image">
+ [\[!img <TMPL_VAR raw_href>
+ size="<TMPL_VAR raw_size>"
+
+ <TMPL_IF alt>
+ alt="<TMPL_VAR raw_alt>"
+ <TMPL_ELSE>
+ <TMPL_IF caption>
+ alt="<TMPL_VAR raw_alt>"
+ <TMPL_ELSE>
+ alt="[pic]"
+ </TMPL_IF>
+ </TMPL_IF>
+
+ ]]
+ <TMPL_IF caption>
+ <p><TMPL_VAR raw_caption></p>
+ </TMPL_IF>
+ </div>
+
+The result, even with htmlscrubber disabled, is mangled, something like
+
+ <div class="image">
+ <span class="createlink"><a href="http://jmtd.net/cgi?
+ page=size&amp;from=log0.000000old_new_test&amp;do=create"
+ rel="nofollow">?</a>size</span>
+
+ </div>
+
+Any suggestions gladly received. -- [[Jon]]