X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b229e2adc2d2e1ad9791cf64a925f382350accf0..9ee5161774d903aa3aa6c285dcf63bdcf0310041:/doc/todo/Allow_per-page_template_selection.mdwn?ds=sidebyside diff --git a/doc/todo/Allow_per-page_template_selection.mdwn b/doc/todo/Allow_per-page_template_selection.mdwn index c915982f5..231ccf502 100644 --- a/doc/todo/Allow_per-page_template_selection.mdwn +++ b/doc/todo/Allow_per-page_template_selection.mdwn @@ -11,14 +11,14 @@ Joey provided a nice suggestion for implementing this feature, ("I would probably add a hook that allowed overriding the default template constuction and returning a template object"). I did start looking into that, but finally I wimped out and just put the following hack -into the genpage() function in Render.pm: +into the `genpage()` function in Render.pm: if ($page eq 'index') { $template->param(suppresstitle => 1); } -That lets me use a in my template to get +That lets me use a `` in my template to get the effect I want. I don't think that's anything that upstream should pick-up as is, (maybe with an appropriate configuration option, but then again allowing for per-page template selection would be more @@ -27,3 +27,17 @@ pursue implementing this feature further myself. But I'd still happily switch to using this feature if someone were to implement it. + +UPDATE: My latest hack is as follows: + + if ($page eq 'index') { + $template->param(toplevelindex => 1); + } + +And that's something that I'm not actually embarrassed to suggest +could be accepted upstream. Joey, what do you think? And would a +proper patch be helpful (it really just adds those lines to the right +place). + +> Fully implemented as a templatefile hook and a [[plugins/pagetemplate]] +> plugin. --[[Joey]] [[done]]