User manual

Chapter 12
Template files
Let's take a closer look at the
koha -tmpl
file; this folder contains files and folders
related to Koha's screens:
The
koha -tmpl
folder contains two folders
- opac -tmpl
for the OPAC,
and
intranet -tmpl
for the staff client
The OPAC and staff client template folder each contains a theme folder
named
prog
The theme folder in turn contains a language folder -
en
or f r, depending
how you installed Koha
Within the language folder, you will find a set of folders j
s - containing
JavaScript files, includes - header, footer, masthead and other include files,
lib-external display -related libraries, such as
yui and j
query, modules -
template files that display Koha's pages and css - stylesheets
Relationships between different types of files
Let's understand how Perl scripts, Perl modules, and template files are related:
Perl scripts call or use subroutines in Perl modules. To use a subroutine,
the Perl script must first load the module using the Use statement, like this:
use C4::Items;
Perl scripts, especially those that are used in Koha screens, have one or more
template files associated with them. To see which template file is associated,
look for statements such as this:
= get_ template _and_user( {template_name => "cataloguing /additem.
tmpl ",
Template files include header or footer types of include files using a
statement such as this:
<! -- TMPL INCLUDE NAME = "doc- head- open.inc" -->
CSS and JavaScript files are usually included in template files via the include
file doc- head - close . inc
[ 229 ]