[Koha-bugs] [Bug 23237] Plugin allow [% INCLUDE %] from template

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Jun 29 09:10:31 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23237

--- Comment #1 from Frédéric Demians <frederic at tamil.fr> ---
Created attachment 91128
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91128&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

-- 
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