Hello, We are using Koha 3.00.04. In the intranet "normal" view of a biblio we needed to differentiate the additional authors whether they are personal, corporate or conference ones (Marc 700, 710 or 711). To achieve this I had to include this information in the structure returned by the method "GetMarcAuthors" of the file lib/C4/Biblio.pm. Line 1472: push @subfields_loop, {* tag=> $field->tag() *,code => $subfieldcode, value => $value, link_loop => \@this_link_loop, separator => $separator} unless ($authors_subfield->[0] eq '9' ); Then in the template file (catalogue/detail.tmpl) I could add something like this: <TMPL_IF EXPR="tag == 700"><strong>Personal:</strong> <!-- TMPL_ELSE --><TMPL_IF EXPR="tag == 710"><strong>Organization:</strong> <!-- TMPL_ELSE --><TMPL_IF EXPR="tag == 711"<strong>Conference:</strong> <!-- TMPL_ELSE --><strong>Type "<!-- TMPL_VAR NAME="tag" -->":</strong> <!-- /TMPL_IF --> <!-- /TMPL_IF --> <!-- /TMPL_IF --> Is it okey or Is there an easier and not that intrusive way of doing it? Regards, Toni
Toni Rosa <arosa@tgi.es>
We are using Koha 3.00.04. In the intranet "normal" view of a biblio we needed to differentiate the additional authors whether they are personal, corporate or conference ones (Marc 700, 710 or 711). To achieve this I had to include this information in the structure returned by the method "GetMarcAuthors" of the file lib/C4/Biblio.pm. [...] Then in the template file (catalogue/detail.tmpl) I could add something like this: [...] Is it okey or Is there an easier and not that intrusive way of doing it?
Maybe I have misunderstood what is trying to be displayed here, but I think XSLT would be an easier and less intrusive way of doing it. Search opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl for @tag=700 to see the sort of place to edit. The OPAC > XSLT... sysprefs will need to be ON too, of course. Hope that helps, -- MJ Ray (slef) Webmaster and LMS developer at | software www.software.coop http://mjr.towers.org.uk | .... co IMO only: see http://mjr.towers.org.uk/email.html | .... op
En/na MJ Ray ha escrit:
Toni Rosa <arosa@tgi.es>
We are using Koha 3.00.04. In the intranet "normal" view of a biblio we needed to differentiate the additional authors whether they are personal, corporate or conference ones (Marc 700, 710 or 711). To achieve this I had to include this information in the structure returned by the method "GetMarcAuthors" of the file lib/C4/Biblio.pm. [...] Then in the template file (catalogue/detail.tmpl) I could add something like this: [...] Is it okey or Is there an easier and not that intrusive way of doing it?
Maybe I have misunderstood what is trying to be displayed here, but I think XSLT would be an easier and less intrusive way of doing it. Search opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl for @tag=700 to see the sort of place to edit.
The OPAC > XSLT... sysprefs will need to be ON too, of course.
Hope that helps,
Thank you for your answer, but the backend part of koha (the Intranet) doesn't seem to be using the xslt files for the Normal view of a biblio. (e.g. in http://MyKohaSite:8080/cgi-bin/koha/catalogue/detail.pl?biblionumber=XXXX) My original question remains unanswered but as I didn't know about the use of xslt files in the newer versions of Koha, thanks for the tip! Regards,
Toni Rosa <arosa@tgi.es>
En/na MJ Ray ha escrit:
Maybe I have misunderstood what is trying to be displayed here, but I think XSLT would be an easier and less intrusive way of doing it. Search opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl for @tag=700 to see the sort of place to edit. [...] Thank you for your answer, but the backend part of koha (the Intranet) doesn't seem to be using the xslt files for the Normal view of a biblio. (e.g. in http://MyKohaSite:8080/cgi-bin/koha/catalogue/detail.pl?biblionumber=XXXX)
See also http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3920 XSLTdetailDisplay syspref controls both OPAC and Intranet XSLT detail display so what I had seen in the past was a bug in some versions, while intranet XSLT files may be coming in 3.2. The original post did clearly say both 3.0 and intranet, though, so sorry for getting confused. Hope that explains, -- MJ Ray (slef) Webmaster and LMS developer at | software www.software.coop http://mjr.towers.org.uk | .... co IMO only: see http://mjr.towers.org.uk/email.html | .... op
participants (2)
-
MJ Ray -
Toni Rosa