X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6a8c921ee1bbfd4c980ffaf2c43e5b45e452f4de..d9364685baf6f35af44a658ab93206afa8397c6d:/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn diff --git a/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn b/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn index 431305622..b28469993 100644 --- a/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn +++ b/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn @@ -15,7 +15,7 @@ ManojSrivastava > I think you could now implement "toplvl" using [[conditionals|/plugins/conditional]]: > -> \[[if test="destpage(/index)" then="""...""" else="""..."""]] +> \[[!if test="destpage(/index)" then="""...""" else="""..."""]] > > --[[JoshTriplett]] @@ -47,6 +47,15 @@ ManojSrivastava }, +> > I'd argue in favour of this plugin; it's true that a simple plugin can be +> > used to set a template variable, but that makes it necessary to write a new +> > plugin for every variable (or set of variables) that are needed. In that +> > kind of situation, I don't think bypassing the plugin mechanism is a bad +> > thing, unless an ever-growing collection of plugins to set one or two +> > variables is a good thing. +> > +> > --[[bma]] + ----
@@ -148,9 +157,9 @@ ManojSrivastava
 +=cut
 +
 +
-+sub import { #{{{
++sub import {
 +	hook(type => "pagetemplate", id => "varioki", call => \&pagetemplate);
-+} # }}}
++}
 +
 +
 +=pod
@@ -166,7 +175,7 @@ ManojSrivastava
 +
 +=cut
 +
-+sub pagetemplate (@) { #{{{
++sub pagetemplate (@) {
 +	my %params=@_;
 +	my $page=$params{page};
 +	my $template=$params{template};
@@ -198,7 +207,7 @@ ManojSrivastava
 +             $template->param("$var" =>"$value");
 +           }
 +        }
-+} # }}}
++}
 +
 +1;
 +
@@ -254,4 +263,4 @@ ManojSrivastava
 +
 
-[[tag patch]] +[[!tag patch]]