Sometimes in templates - you want to adjust the layout based on files in the namespace. For example - have sidebars per namespace, and only show a sidebar if there is one. For that, I needed to add something like this into ./inc/template.php --- inc/template.php.org 2010-09-10 10:29:29.000000000 -0400 +++ ./inc/template.php 2010-09-10 10:30:24.000000000 -0400 @@ -444,6 +444,21 @@ } /** + * see if a file exists in the same namespace, + * default file to look for is 'sidebar' + * + * return true if the file exists, false otherwise + * + * @author Robin Getz <robin.getz@xxxxxxxxxx> + */ +function tpl_fileexists($id, $file){ + global $conf; + $parent = getNS($id).':'.$file; + resolve_pageid('',$parent,$exists); + return $exists; +} + +/** * Print one of the buttons * * Available Buttons are -- DokuWiki mailing list - more info at http://www.dokuwiki.org/mailinglist