X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/76f2571a7cc0c89c803a3315b5016d495dc3a116..7236d09adb3c5139e4990dad88f41c4ca4c18eb4:/doc/patchqueue/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn diff --git a/doc/patchqueue/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn b/doc/patchqueue/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn index e617f17c1..0fd715642 100644 --- a/doc/patchqueue/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn +++ b/doc/patchqueue/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn @@ -9,6 +9,12 @@ This plugin hooks itsef into the "pagetemplate" hook, and adds parameters to the ’toplvl’ => ’sub {return $page eq "index"}’ }, -For every key in the configured hash, the corresponding value is evaluated. Based on whether the value was a stringified scalar, code, array, or hash, the value of the template parameter is generated on the fly. The available variables are whatever is available to "pagetemplate" hook scripts, namely, $page, $destpage, and $template. Additionally, the global variables and functions as defined in the Ikiwiki documentation () may be used. +For every key in the configured hash, the corresponding value is evaluated. Based on whether the value was a stringified scalar, code, array, or hash, the value of the template parameter is generated on the fly. The available variables are whatever is available to "pagetemplate" hook scripts, namely, $page, $destpage, and $template. Additionally, the global variables and functions as defined in the Ikiwiki documentation () may be used. -ManojSrivastava \ No newline at end of file +ManojSrivastava + +> I think you could now implement "toplvl" using [[conditionals|/plugins/conditional]]: +> +> \[[if test="destpage(/index)" then="""...""" else="""..."""]] +> +> --[[JoshTriplett]]