[Koha] Changing the user inteface of KOHA

Owen Leonard oleonard at athenscounty.lib.oh.us
Thu Jan 12 07:15:41 NZDT 2006


>i am trying to change the koha interface so i found that a lot of
>templates inside.But i am trying to open that in dreamwaeaver but i can
>not open the user interface properly.

Koha's templating system allows you to have a great amount of control over
the interface, but it's not always easy to get started.  The template files
(*.tmpl, *.inc) are used by Perl's HTML::Template to create the HTML files
that are returned to the user.

http://html-template.sourceforge.net/article.html
http://www.sitepoint.com/article/introducing-html-template

The template files are NOT straight HTML, which is why Dreamweaver can't
handle them.  Dreamweaver wants to try to build a dynamic preview of the
template file and it can't because the template file contains not only HTML
markup but also <!-- TMPL --> tags which control the output.

If you want to get your hands dirty and to some template editing, the best
option is to use a text editor.  Someone suggested HTML-Kit, which would
work fine.  It doesn't do syntax-highlighting for .tmpl files by default,
but you can tell it to.

To start working, pick one of the current templates to customize (default
or npl in the intranet, css or npl in the opac), and copy all the files to
a new folder.  Then go into Koha's system preferences and change your
template to the new one.  That way you'll still have the originals to fall
back on if something breaks.

One confusing thing about a lot of the templates is that one template will
handle several different situations depending on what action the user has
taken.  So the whole structure of the template might be wrapped in
conditional tags:

<!-- TMPL_IF NAME="case1" -->
	[ some HTML code here ]
<!-- TMPL_ELSE -->
	[ some HTML code here ]
<!-- /TMPL_IF -->

Use the standard HTML markup on the page to give you clues as to what's
going on and where you are in the template, comparing it to what you see on the screen
running Koha.

And let me know if there are any other questions I can answer!

  -- Owen

----
Nelsonville Public Library
http://www.athenscounty.lib.oh.us


More information about the Koha mailing list