[Koha] Browse by hierarchy - Links not working

anjoze joseanjos at gmail.com
Mon Sep 17 10:08:31 NZST 2012


Hi Manos Petridis.

Now I can browse by hierarchy :)
In my case, because we are Portuguese and work with UDC-Classification
instead of Dewey-Classification it was a bit more difficult but it is
solved. We use Unimarc.
Because I don’t know if you work with UDC or Dewey I will give my example.
1: MAKE ZEBRA SEARCH BY UDC-Classification

This explanation saved the day:
http://wiki.koha-community.org/wiki/Understanding_Zebra_indexing#Another_real_life_example

What I have done: (++ is to add)

/etc/koha/zebradb/marc_defs/ccl.properties
*Uncomment*: UDC-classification 1=14

/etc/koha/zebradb/marc_defs/unimarc/biblios/record.abs
++ melm 675$a              UDC-classification

/usr/share/koha/lib/C4/Search.pm  → In: my @indexes = (
++ 'UDC-classification',

*I'm not sure about this part:*
/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/includes/masthead.inc
/++ [% IF ( ms_UDC-classification ) %]
       <option selected="selected" value="UDC-classification">CDU</option>
               [% ELSE %]
       <option value="UDC-classification">CDU</option>
               [% END %]/

2: BROWSE BY HIERARCHY


Edit:
/usr/share/koha/opac/htdocs/opac-tmpl/prog/pt-PT/modules/opac-browser.tt
*Change*: a href="opac-search.pl?q=Dewey-classification:
*For*      : a href="opac-search.pl?q=UDC-classification:

*Edit:* /usr/share/koha/bin/cronjobs/build_browser_and_cloud.pl
and change to your your lang and framework field:
if (C4::Context->preference('opaclanguages') =~ m/^*pt*/i && $browser_tag eq
*'675'* & $browser_subfield eq *'a'*) {

In the same file, build_browser_and_cloud.pl, you need to change *ALL the
French classification* to yours.
*It is done!!*

Than just rebuild /build_browser_and_cloud.pl/ and voilá. (If it works put
it in cron +/- 2 times per month )

But, there is a little issue with this, it should have right and left
truncation... maybe in the next version :)
Example:
If you click on 322 the search will find everything with 322, in the
beginning, midle or end.
But you can search writing this:
/UDC-classification=322 and UDC-classification,first-in-subfield=322/
This will search everything starting by 322

I steel cant get the classifications names just the numbers, but, for now,
I'm happy.

About your problem *Can't locate C4/Context.pm in @INC*
Someone in this forum found this solution:
Copying C4 directory to /etc/perl/ should solve your problem:
cp -a /usr/share/koha/lib/C4/  /etc/perl/

Hope it helps,
José Anjos



-----
Koha version: 	3.08.04
       - -
José Anjos
--
View this message in context: http://koha.1045719.n5.nabble.com/Browse-by-hierarchy-Links-not-working-tp5724658p5726924.html
Sent from the Koha-general mailing list archive at Nabble.com.


More information about the Koha mailing list