[Koha-bugs] [Bug 23237] Plugin allow [% INCLUDE %] from template
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jul 30 15:52:44 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23237
--- Comment #3 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 91875
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91875&action=edit
Bug 23237: Plugin allow [% INCLUDE %] from template
>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 at inlibro.com>
Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list