[Koha-bugs] [Bug 23237] Plugin allow [% INCLUDE %] from template
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jul 5 22:11:24 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23237
Maryse Simard <maryse.simard at inlibro.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #91128|0 |1
is obsolete| |
--- Comment #2 from Maryse Simard <maryse.simard at inlibro.com> ---
Created attachment 91374
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91374&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>
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list