More about classifiers

More about classifiers

From GreenstoneWiki

I've added a new type of classification to my collection. How do I create and add the navigation bar images?

Visit this page and follow the instructions. Note: this is only necessary for Greenstone v2.62 and earlier (newer versions use CSS to generate the navigation bar automatically).

I've added a new type of classification to my collection. How do I translate the navigation bar labels (2.71 and later)?

By default, the Title of a classifier is used as the button label in the navigation bar. The Title given to a classifier depends on the options used when creating it. In general, the -buttonname option will be used first, or the -metadata option if no buttonname is specified. The library looks for alternative text or translations in the macro files. If the Title is XXX, if the macro _labelXXX_ is defined, then this will be used for the label. If it is not defined, then the Title will be used as is. _textXXX_ and _textdescrXXX_ are used for the roll over text and help text on the about page. Provide translations of these macros to get translations of the label and help text.

How can I do Unicode collation for my classifier?

GenericList is the only classifier that supports non [a-z0-9] metadata values. It will handle creating horizontal lists using different scripts. Support for Unicode collection has been added to GenericList since 2.72. To set this up, you need to do the following:

  • Make sure you're using Greenstone 2.72.
  • Download the updated version of GenericList.pm from http://vulcan.nz.dlconsulting.com/~michael/GenericList.pm and overwrite your existing version in the Greenstone "perllib/classify" directory.
  • Download the http://www.unicode.org/Public/UCA/4.1.0/allkeys.txt file and put this in your system Perl "lib/Unicode/Collate" directory (Unix) or in the Greenstone "bin/windows/perl/lib/Unicode/Collate" folder (Windows).
  • Specify the "-sort_using_unicode_collation" option for your GenericList.
  • Rebuild the collection.