Koha Test Wiki MW Canasta on Koha Portainer

Test major Koha Wiki changes or bug fixes here without fear of breaking the production wiki.

For the current Koha Wiki, visit https://wiki.koha-community.org .

Template Toolkit Plugins

From Koha Test Wiki MW Canasta on Koha Portainer
Jump to navigation Jump to search

This page document the plugins available in Koha templates. They can be used by developers when working with templates or by administrators/librarians in notices and slips.

Some plugins provides methods, some provides filters

Asset

Provides methods to insert javascript and css files into template.

[% USE Asset %]
[% Asset.css("css/datatables.css") %]
[% Asset.js("js/datatables.js") %]

[%# With attributes %]
[% Asset.css("css/print.css", { media = "print" }) %]

[%# If you only want the url and not the HTML tag %]
[% url = Asset.url("css/datatables.css") %]

AudioAlerts

Helper plugin which provides one method: AudioAlerts. This method return JSON with audio alerts configuration

AuthorisedValues

This plugin provides several methods for working with authorised values:

GetByCode

Takes three parameters: category, value, and opac flag.

It returns description of of value in category, if opac flag is true, the opac version of description is used.

Example, this returns the description of withdrawn status of item in version for opac:

[% USE AuthorisedValues %]
[% AuthorisedValues.GetByCode( 'WITHDRAWN', '1', 1 ) %]


Get

[% USE AuthorisedValues %]

GetAuthValueDropbox

[% USE AuthorisedValues %]

GetCategories

[% USE AuthorisedValues %]

GetDescriptionsByKohaField

[% USE AuthorisedValues %]

GetDescriptionByKohaField

[% USE AuthorisedValues %]

Biblio

Borrowers

Branches

Cache

Categories

CirculationRules

ColumnsSettings

HtmlTags

I18N

See Internationalization,_plural_forms,_context,_and_more_(RFC) for more info

ItemTypes

Koha

KohaDates

KohaPlugins

KohaSpan

Price

raw

Remove_MARC_punctuation

To