Bug 25961: Add hooks for plugins to inject variables to OPAC XSLT
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 8 Jul 2020 19:54:51 +0000 (16:54 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 30 Jul 2020 15:30:23 +0000 (17:30 +0200)
commit9676f537a448d50770c90d9d5a8b420a1f302444
tree0af19063ee1fd8b0629e37e6003094d397e00e0f
parent50ebed51ee160992e22cde55dcd657beb7429f8f
Bug 25961: Add hooks for plugins to inject variables to OPAC XSLT

This patch adds the following plugin hooks:
- opac_results_xslt_variables
- opac_detail_xslt_variables

This hooks will inject variables returned by the plugin in the form of a
hashref, into the ones that are passed to the XSLT processing code.

To test:
1. Apply the 'DO NOT PUSH' commit
2. Install the Kitchensink plugin
3. Restart all
4. Search biblios in the OPAC
=> SUCCESS: A text is injected in front of the biblio title
5. Enter the detail page of any of the results
=> SUCCESS: A text is injected in front of the biblio title
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
opac/opac-detail.pl
opac/opac-search.pl