Improved display of Aleph holdings in SFX menu
Tags: aleph
, plugin
, holdings
Last Updated: Oct 30, 2009 01:38
- Description
This code improves the display of Aleph holdings in the SFX menu (using the plugin/displayer mechanism). The standard Ex Libris code does not display the fields nicely in columns.
- Author: Matthew Phillips
- Additional author(s):
- Institution: University of Dundee
- Year: 2009
- License: BSD style
- Short description: Use, modification and distribution of the code are permitted provided the copyright notice, list of conditions and disclaimer appear in all related material.
- Link to terms: [Detailed license terms]
- Skill required for using this code:
intermediate
State
Stable
Programming language
Perl
Software requirements
None
Download
Download the code from http://www.exlibrisgroup.org/download/attachments/21790893/AlephSFX.zip and unpack it on your SFX server.
Working example
Installation instructions
This enhancement is to allow details of print holdings of journals held on Aleph to be displayed nicely in the SFX menu. The display is better than the standard Ex Libris plugin/displayer produces. Please see the SFX user guide for background information on how to set this up. Only the main differences are explained below.
Several modified files are required. In each case I have added "_dun" to the filename so that they can live alongside the official versions.
Target Displayer module
Place the displayer.pm file from the attached zip archive in /exlibris/sfx_ver/sfx_version_3/sfxlcl3/lib/Parsers/TargetDisplayer/ALEPH and call it ALEPH_DUN.pm. If you really want to rename it to something else you will need to change the package declaration on the first line of the file.
The TargetDisplayer module should not need altering, unless you wish to use a different name for the template file. The module takes the plugin output, which is an array of string values, and splits the strings into data for the columns. It sets the template values COLUMN1, COLUMN2, COLUMN3 etc. up to however many columns are produced to the correct values. These are then inserted in the appropriate template by the standard SFX code.
Template file
The template file is called getHolding_ALEPH_DUN.tmpl and should be placed in /exlibris/sfx_ver/sfx_version_3/sfxlcl3/templates/sfxmenu/services
You can edit the template to change the column headings and the style of the font used and column spacings. I haven't done the table style neatly using a separate CSS style sheet as that would have been too much like hard work. If the data you are fetching is going to occupy more than four columns, you can add extra columns to the template file.
Configuration file
The configuration file, aleph_xserver_lookup_dun.config, should be placed in /exlibris/sfx_ver/sfx_version_3/sfxlcl3/config
Most settings should be set up as for the standard Aleph plugin.
Otherwise the main difference is that the marc_field setting can only contain a single field. A new marc_subfields setting lists the subfields required in each column, separated by spaces. At Dundee we have our periodical holdings on separate HOL records attached to the same BIB record. The summary holdings are in 866$a, and the sub-library, collection and call number are in 852$b, $c and $h. To get all the information from our holdings expanded into the one field, we have the following set up in tab_expand on the Aleph side:
WWW-X expand_doc_bib_hol_usm
WWW-X expand_doc_hol_852_disp
The first expand routine takes the 852 and 866 from each HOL, concatenates them, and adds them to the BIB record, converting the sub-library and collection codes to their display values. The second expand routine converts the sublibrary and collection code to the public display format in the 852 field. You don't really need the second line for what we are doing.
I did think about getting the plugin to read data from more than one MARC field, but the difficulty is what to do about repeated fields. If there are three 852 fields and two 866 fields, how do you work out which ones belong together? If you set up the Ex Libris Aleph plugin to read more than one field, e.g. 852$b, 852$c, and 866$a, then it will read and display all the 852$b first, followed by all the 852$c etc. so the user cannot tell which relate to each other.
Plug-in module
The plugin module is the file which has had most alterations. See the file plugin.pm in the attached zip archive. It should be placed in /exlibris/sfx_ver/sfx_version_3/sfxlcl3/lib/Parsers/PlugIn and named ALEPH_DUN.pm. If you want to give it a different name you need to change the package declaration line at the start of the file. The name of the configuration file to use is defined in this module, so if you prefer something other than "aleph_xserver_lookup_dun.config" change it here.
There is also a section which strips out electronic journal holdings at the University of Dundee, which is very specific to us. You may wish to alter it. It probably won't do any harm leaving it in, but if you want to strip e-journal holdings you may need to modify it. I should have written the code to use a configuration setting but I was lazy.
Setup required in SFX admin interface.
Find your LOCAL_CATALOGUE_EX_LIBRIS_ALEPH target and alter the getHolding target service as follows:
Change the Displayer to ALEPH::ALEPH_DUN
Change the local threshold to something like:
GLOBAL && $obj->plugIn('ALEPH_DUN')
Ours is actually set to
GLOBAL && $obj->need('sfx.sid','ne','ALEPH:DUN01') && $obj->plugIn('ALEPH_DUN')
which prevents the Aleph target appearing if the user has arrived at the SFX menu from our Aleph catalogue.
Note that if the plugin does not find any suitable matching records in Aleph, then the Aleph target will not appear on the SFX menu at all. We don't like this behaviour because sometimes the plugin fails to find stuff which actually is in the catalogue, so we prefer to give the user the option of trying. For example, if you are using xISBN post-enrichment then the plugin might not find an alternative edition of a book via ISBN, but the target would actually find it after the xISBN lookup.
Therefore we made an extra copy of the LOCAL_CATALOGUE_EX_LIBRIS_ALEPH target called LOCAL_CATALOGUE_EX_LIBRIS_ALEPH _FALLBACK and have set it up without the plugin threshold or the displayer. We then use menu display logic so that the fallback target only appears if the main target doesn't.
Comments
Text...

