From: Simon McVittie Date: Mon, 1 Sep 2014 07:56:46 +0000 (+0100) Subject: Only provide time, not formatted_time, to edittemplate templates X-Git-Tag: 3.20140916~43^2~2 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/6806ddfdff5e17ec85683d38bad814a46ffa4efe?ds=inline;hp=-c Only provide time, not formatted_time, to edittemplate templates I'm not sure what the use-case is for formatted_time, and chrysn pointed out that for display in HTML, [[!date ""]] would be nicer. --- 6806ddfdff5e17ec85683d38bad814a46ffa4efe diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index c61f6336b..947c8f215 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -157,7 +157,6 @@ sub filltemplate ($$) { my $time = time(); $template->param(time => IkiWiki::formattime($time, "%Y-%m-%d %H:%M:%S")); - $template->param(formatted_time => IkiWiki::formattime($time)); return $template->output; } diff --git a/doc/ikiwiki/directive/edittemplate.mdwn b/doc/ikiwiki/directive/edittemplate.mdwn index 22767de43..13e282c11 100644 --- a/doc/ikiwiki/directive/edittemplate.mdwn +++ b/doc/ikiwiki/directive/edittemplate.mdwn @@ -29,7 +29,7 @@ something like: The template page can also contain [[!cpan HTML::Template]] directives, like other ikiwiki [[templates]]. -Four variables might be set: +These variables might be set: * `` is replaced with the name of the page being created. @@ -40,7 +40,4 @@ Four variables might be set: * `` is replaced with the current (template generation) time, using a fixed format, `%Y-%m-%d %H:%M:%S`. -* `