1 [[!meta author="""http://jmtd.livejournal.com/"""]]
3 [[!meta authorurl="""http://jmtd.livejournal.com/"""]]
5 [[!meta title="""change to bugs/argument_isn__39__t_numeric:_mixing_templates_and_creation__95__date on ikiwiki"""]]
7 [[!meta permalink="http://ikiwiki.info/recentchanges/#change-5430d5dc3bc37df92eb01cd65382c0f2be78b8e7"]]
9 <div id="change-5430d5dc3bc37df92eb01cd65382c0f2be78b8e7" class="metadata">
10 <span class="desc"><br />Changed pages:</span>
11 <span class="pagelinks">
13 <a href="http://git.ikiwiki.info/?p=ikiwiki;a=blobdiff;f=doc/bugs/argument_isn__39__t_numeric:_mixing_templates_and_creation__95__date.mdwn;h=83093895b37a4fb3be524cd237fc5ce8f5b2169d;hp=5485bba9ca2244260ae4ecb0894e935817bf377d;hb=5430d5dc3bc37df92eb01cd65382c0f2be78b8e7;hpb=62fc5d0c3cfdde0ae87c5364db6f6ebfa6794b14" title="diff" rel="nofollow">[[diff|wikiicons/diff.png]]</a><a href="http://ikiwiki.info/ikiwiki.cgi?page=bugs%2Fargument_isn__39__t_numeric%3A_mixing_templates_and_creation__95__date&do=goto" rel="nofollow">bugs/argument isn't numeric: mixing templates and creation_date</a>
17 <span class="desc"><br />Changed by:</span>
18 <span class="committer">
20 <a href="http://jmtd.livejournal.com/" rel="nofollow">jmtd [livejournal.com]</a>
23 <span class="desc"><br />Commit type:</span>
24 <span class="committype">web</span>
25 <span class="desc"><br />Date:</span>
26 <span class="changedate"><span class="relativedate" title="Mon, 15 Nov 2010 10:43:35 -0400">10:43:35 11/15/10</span></span>
27 <span class="desc"><br /></span>
31 <a href="http://ikiwiki.info/ikiwiki.cgi?rev=5430d5dc3bc37df92eb01cd65382c0f2be78b8e7&do=revert" title="revert" rel="nofollow">[[revert|wikiicons/revert.png]]</a>
34 <div class="changelog">
37 not quite done yet: if/included() doesn't work that way.<br />
44 diff --git a/doc/bugs/argument_isn__39__t_numeric:_mixing_templates_and_creation__95__date.mdwn b/doc/bugs/argument_isn__39__t_numeric:_mixing_templates_and_creation__95__date.mdwn
45 index 5485bba..8309389 100644
46 --- a/doc/bugs/argument_isn__39__t_numeric:_mixing_templates_and_creation__95__date.mdwn
47 +++ b/doc/bugs/argument_isn__39__t_numeric:_mixing_templates_and_creation__95__date.mdwn
48 @@ -46,8 +46,7 @@ A workaround is to move the template outside of the srcdir into the external tem
50 \[[!template id=all_entry.tmpl year=2010 current=true]]
52 -An alternative fix is to wrap the entire template inside a test to see whether the page is included or not. E.g.
54 +I believed (until I tested) that the [[ikiwiki/directive/if]] directive, with the `included()` test, would be an option here, E.g.
56 \[[!if test="included()" then="""
58 @@ -55,6 +54,4 @@ An alternative fix is to wrap the entire template inside a test to see whether t
60 """]]
62 -In fact, this is probably best practice for in-srcdir templates. I'd consider this done if the documentation for the directive suggested it. -- [[Jon]]
64 -> [[done]] with <http://git.ikiwiki.info/?p=ikiwiki;a=commitdiff;h=da9e1ea667f82d5fca9168dbed19be08040570ff> -- [[Jon]]
65 +However this doesn't work. I assume "included" in this context means e.g. via an `inline` or `map`, not template trans-clusion. -- [[Jon]]
70 <!-- 5430d5dc3bc37df92eb01cd65382c0f2be78b8e7 -->