Browse Source
From a plugin template it is useful to be able to include other templates with [% INCLUDE %] directives. But TT module is used by Koha with absolute paths. Relative paths are forbidden for security reasons. A new param [% PLUGIN_DIR %] allow plugin templates to know where to find plugin home directory. How to test: 1. Install kitchen-sink plugin. 2. Find tool-step1.tt file, and add this at the begining of the file: [% INCLUDE "$PLUGIN_DIR/header.tt" %] It ask to include a template header.tt which doesn't exit. 3. Run kitchen-sink plugin tool. You must have this error message: Template process failed: file error - _path to plugin directory_/Koha/Plugin/Com/ByWaterSolutions/KitchenSink/header.tt: not found quod erat demonstrandum Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>remotes/origin/19.11.x
1 changed files with 47 additions and 1 deletions
Loading…
Reference in new issue