[Koha] Question re: NPL OPAC icons & ItemTypes

Owen Leonard oleonard at athenscounty.lib.oh.us
Thu Jun 16 14:20:36 NZST 2005


> I assume there is a line of code that tells Koha if ItemType = X then icon = X'.

No, there's no such line of code.  The icons work because their file names
are the same as the item's itemtype code or itemtype description.  So if
the itemtype code is 'AF', then the template says:

<img src="/includes/images/<!-- TMPL_VAR NAME='itemtype' -->.gif">

...And in your images directory, you have AF.gif, AV.gif, AC.gif, SF.gif,
etc.  This is a clumsy system, but it's what worked given the framework
that now exists.  Paul has talked about building a better
database/preference-based system, but that hasn't come to pass yet.

The interim solution is to have multiple copies of the same image with
different file names.  So, if you have one book icon but several book item
types, you just copy and rename the file for each item type.

Would that work?

  -- Owen
_______________________________________________
Koha mailing list
Koha at lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha



More information about the Koha mailing list