Koha tips and tricks 5

8 January 2019 by Catalyst IT Europe

Koha is a Library Management System (LMS) used worldwide by approximately 15,000 libraries. The Koha team at Catalyst are passionate about using Koha and helping libraries (big and small!) get the most out of their Koha LMS.

This is the fifth blog in the Koha tips and tricks series to help you make the most out of your Koha instance. In this post, Alex covers how to change the bibliographic information displayed in the OPAC, and solutions for a couple of the more common OPAC display issues.

To read from the beginning of the tips and tricks series start here

1. Is it possible to alter the ‘material type’ of a bibliographic record?

 Material type is a value stored in the bibliographic record. It is displayed by default in both the search results and details pages in both the Koha staff client and the OPAC (more on how to change what is displayed in these interfaces in tip #2). Figure 1 highlights how the material type of ‘Book’ is displayed in the staff client search result interface.

Book with an icon of a book below the authors name of a bibliographic record in the Koha staff client search results interface

Figure 1. Material type in the staff client search results

 The material type value is defined in a bibliographic record as a single character stored in the 006 (7th position) of the leader field (first field in a MARC record). In figure 2 the material type of ‘book’ is denoted by the digit ‘a’ in the 006 position.

Yellow highlighted letter a which is in the 7th position of a bibliographic leader field denoting the material type is book

Figure 2. Highlighted character in the 7th position of the leader (000) field of a bibliographic record which denotes the material type is ‘book’

 If the material type of a biblio is incorrect there are several ways to address this issue with Koha:

  • Hide the material type in the Koha staff client and OPAC

1) Go to Administration -> Global system preferences -> Search for ‘material type’.

2) Set the ‘DisplayIconsXSLT’ and ‘DisplayOPACiconsXSLT’ system preferences to ‘Don’t show’.  This hides the material type information from being displayed in the staff client and OPAC interfaces. (Note: this will also hide the ‘format’ and ‘audience’ information.)

Staff client search result interface showing bibliographic information such as title, authors name, publisher name, description name, ISBN number, Online access. No material type is being displayed.

Figure 3. Staff client search result with material type hidden from display

 

  • Manually modify the material type

1) In the staff client, search for an item and click on the item from the search results

2) Select the ‘Edit’ button at the top of the page

Yellow arrow pointing at the Edit button at the top of the biblio detail page in the Koha staff client interface

Figure 4. Edit button on biblio detail page in Koha staff client

3) Select the ‘Edit record’ drop-down option

4) Change the 7th character in the 000 Leader field. For example, changing this value to ‘b’ results in the material type being set to ‘Article’.

  • Batch modify the material type of multiple bibliographic records

Catalyst has a script called fix_leader.pl. This script can update the material type values in the leader field of bibliographic records so the material type matches the itemtype of the biblioitems. The script retrieves the biblionumber of all bibliographic records with an item level item type of ‘Continuing Resources’ and it goes through and changes the leader of each biblio to serial.

At present this only works for changing the material type where the itemtype is ‘Continuing Resource’ (i.e. a periodical), however with a small modification this script can work with a variety of itemtypes.

 2. Can the information displayed in search result pages and book detail pages in the Koha OPAC and staff client be customized?

 In Koha on the search result and the individual book detail pages in both the staff client and OPAC interfaces, you will notice information about the book is displayed.

Yellow highlighted block of text which contains information about a bibliographic record including authors name, material type, publishers name, ISBN number, subject, DDC classification, online resources, summary, lists the item appears in and tags. All of this information is displayed in the biblio detail page in the Koha staff client.

Figure 5. Highlighted bibliographic information in biblio detail page in Koha staff client

It is possible to change the default information about the book that is displayed. The files that define what is displayed are written in a format called XSLT (eXtensible Stylesheet Language Transformations). It is used to convert files from one format XML to another format HTML. The XSLT files that are displayed are defined in the following system preferences:

XSLTDetailsDisplay – This XSLT file is used in Staff client biblio detail page

XSLTResultsDisplay – This XSLT file is used in Staff client search results interface

OPACXSLTDetailsDisplay – This XSLT file is used in OPAC biblio detail page

OPACXSLTResultsDisplay – This XSLT file is used in OPAC search results interface

So what you can do is ask your Koha support vendor, to create a custom XSLT file from one of the existing community XSLT files, then amend it to show the MARC fields you are interested in displaying. Upload this file to the Koha server, and change the appropriate aforementioned system preferences to point to the new custom XSLT file.

 3. Why is there a ‘No cover image available’ box appearing in OPAC search results and can it be hidden?

Single search result in Koha OPAC search result page. A yellow arrow is pointing at a white box containing the words No cover images available. This white box is positioned above another box displaying a cover image of a book.

Figure 6. OPAC search result with ‘No cover image available’ box 

This box is displayed because you have the OPACLocalCoverImages system preference enabled, and Koha can find no local cover image for that biblio. Figure 6 is also displaying a cover image, this is because the AmazonCoverImages system preference is enabled and Koha has been able to retrieve a cover image from Amazon.

Hiding the ‘No Cover image available’ box is easy:

1) In the Koha staff client go to: Administration-> Global System preferences

2) Search for OPACUserCSS

3) Paste the following CSS code into the OPACUserCSS syspref:

.no-image { display: none !important; }

Single search result in Koha OPAC search result page, with no white ‘No cover image available’ box is being displayed

Figure 7. OPAC search result with no ‘No cover image available’ box displayed

 

 4. We have upgraded to Koha 18.05 and the styling is broken, how do we fix this?

 After upgrading your Koha instance to an 18.05.x version you may find that the styling of your site is broken.

Webpage containing white background, content all aligned to the left of the page rather than spread horizontally across the Koha OPAC homepage due to styling being broken after upgrading to Koha 18.05.

Figure 8. Koha OPAC home page with broken styling after upgrading to Koha 18.05

There are two fixes for this, outlined below. Attempt Fix 1 and if that doesn’t resolve the issue, then try Fix 2:

Fix 1: 

Ask your Koha support vendor to reload and restart apache2, with the following terminal commands:

sudo /etc/init.d/apache2 reload

sudo /etc/init.d/apache2 restart

Fix 2: 

(i) Ask your Koha support vendor to add the following two Apache rewrite rules to the /etc/koha/apache-shared-intranet.conf and /etc/koha/apache-shared-opac.conf files.

RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].js$ $1.js [L]

RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].css$ $1.css [L]

If your Koha instance is running off a gitified directory (your Koha support vendor will know if this is the case) then your vendor will need to add those Apache rewrite rules to different files: /etc/koha/apache-shared-intranet-git.conf and /etc/koha/apache-shared-opac-git.conf

Once complete save, then exit the file

(ii) As above in Fix 1, reload and restart apache2 with the following terminal commands:

sudo /etc/init.d/apache2 reload

sudo /etc/init.d/apache2 restart

Now reload your webpage and the styling should be displaying correctly.

                 

 Stay tuned for more in Alex’s ‘Koha tips and tricks’ series! 

 

Catalyst Kohagreen egg with white koru within

If you have any questions or comments about this blog post or would like some support with your Koha instance you are welcome to email us at koha@catalyst.net.nz

Follow Catalyst Koha on Twitter!