Terence J. Grant wrote:
You can make functions available to a template via a plugin by placing them in an action plugin outside of the class scope. All action plugins are included prior to the template being included/executed. Or (didn't I mention this before?) you can leave the functions inside the action plugin class scope and have the template trigger (custom) events. Doing things this way neatly avoids having to use extensive function/class/method existence checks. If you fire an event for which there is no handler nothing will happen an no error method with disrupt the user.What are folks thoughts on moving the template functions outside of the main codebase and into a "plugin"-- so that template folks can chip away at the template functions, add new ones and such... without having to wait for a new dokuwiki stable?
Ideally I think you could keep the admin.php for displaying how to use the functions(or possibly just link to the api specs) and just have a single code.php file that you include at the top of your template. (Like how the "display wiki page" plugin works.)
Thoughts?
e.g.
trigger_event('CUSTOM_TEMPLATE_EVENT',....);
Cheers,
Chris -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist