> I think you could now implement "toplvl" using [[conditionals|/plugins/conditional]]:
>
-> \[[if test="destpage(/index)" then="""...""" else="""..."""]]
+> \[[!if test="destpage(/index)" then="""...""" else="""..."""]]
>
> --[[JoshTriplett]]
},
</pre>
+> > 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]]
+
----
<pre>
+=cut
+
+
-+sub import { #{{{
++sub import {
+ hook(type => "pagetemplate", id => "varioki", call => \&pagetemplate);
-+} # }}}
++}
+
+
+=pod
+
+=cut
+
-+sub pagetemplate (@) { #{{{
++sub pagetemplate (@) {
+ my %params=@_;
+ my $page=$params{page};
+ my $template=$params{template};
+ $template->param("$var" =>"$value");
+ }
+ }
-+} # }}}
++}
+
+1;
+
+
</pre>
-[[tag patch]]
+[[!tag patch]]