Koha::Template::Plugin::Koha - General Koha Template Toolkit plugin
This plugin contains various Koha replated Template Toolkit functions to help streamline Koha and to move logic from the Perl code into the Templates when it makes sense to do so.
To use, first, include the line '[% USE Koha %]' at the top of the template to enable the plugin.
For example: [% IF Koha.Preference( 'MyPreference ) == 'SettingA' %] removes the necessity of setting a template variable in Perl code for each and every system preference, even if no evaluation of the setting is necessary.
This new method allows us to store the context which gives us access to the template vars already set. In particular this gives us access to the template vars set by C4::Auth::get_template_and_user
Missing POD for Preference.
Missing POD for MultivaluePreference.
This method checks if the currently logged in user is allowed access to the new debug ui permission. It should return 0 if no one is logged in or context is unavailable for some other reason or they do not have the permission 1 if they are a superlibrarian 1<<32 if they do have the permission
The delimiter option 'tabs' is stored in the DB as 'tabulation' to avoid issues storing special characters in the DB. This helper function translates the value to the correct character when used in templates.
You can, optionally, pass a value parameter to this routine in the case of delimiter being fetched in the scripts and still needing to be translated
Missing POD for Version.
Generate a new CSRF token.