-`/view/howto/u*.mdwn` page is not an option : there may be quite
-a few, that's why I intend to use the pagetemplate plugin in the first
-place to assign them a common template.)
-
-More or less OT: I've not checked the compatibility of pagetemplate
-and template plugins yet; can a template (`*.tmpl`), assigned by
-pagetemplate, itself call a template (`*.mdwn`) managed by the
-template plugin ? The hooks call order tends to make me think it is
-not possible, which anyway would ruin my current plan.
-
+`/view/howto/u*.mdwn` page is not an option : I want to factorize the
+most possible of these pages.
+
+> The following patch adds a `basename` `TMPL_VAR` variable that can be
+> used in the templates inserted by [[template plugin]] :
+
+> diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm
+> index a6e34fc..bb9dd8d 100644
+> --- a/IkiWiki/Plugin/template.pm
+> +++ b/IkiWiki/Plugin/template.pm
+> @@ -57,6 +57,8 @@ sub preprocess (@) { #{{{
+> }
+> }
+>
+> + $template->param("basename" => (split("/", $params{page}))[-1]);
+> +
+> return IkiWiki::preprocess($params{page}, $params{destpage},
+> IkiWiki::filter($params{page}, $params{destpage},
+> $template->output));
+>
+> -- intrigeri