aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-05-29 18:54:59 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-05-29 18:54:59 +0000
commitb229e2adc2d2e1ad9791cf64a925f382350accf0 (patch)
treeea18a976b4127abf39d341e3769f14ff04bb56ec
parent3914ba30a2a7aa5d7f30a5166beccd72317726b9 (diff)
downloadikiwiki-b229e2adc2d2e1ad9791cf64a925f382350accf0.tar
ikiwiki-b229e2adc2d2e1ad9791cf64a925f382350accf0.tar.gz
web commit by cworth
-rw-r--r--doc/todo/Allow_per-page_template_selection.mdwn21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/todo/Allow_per-page_template_selection.mdwn b/doc/todo/Allow_per-page_template_selection.mdwn
index ba12e296d..c915982f5 100644
--- a/doc/todo/Allow_per-page_template_selection.mdwn
+++ b/doc/todo/Allow_per-page_template_selection.mdwn
@@ -6,3 +6,24 @@ so I'd like it to use a separate front.tmp template instead.
I'm not sure what syntax to use for this, (\[[template]] seems to be
taken for another purpose already). Perhaps something like
\[[page-template front]] ?).
+
+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:
+
+
+ if ($page eq 'index') {
+ $template->param(suppresstitle => 1);
+ }
+
+That lets me use a <TMPL_UNLESS SUPPRESSTITLE> 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
+powerful anyway). But I'm happy enough now that I probably won't
+pursue implementing this feature further myself.
+
+But I'd still happily switch to using this feature if someone were to
+implement it.