@@ -, +, @@ - Create a list - Open the list in the staff interface - On a new tab, open the list in the OPAC. - Apply this patches - Open the list (both opac and staff) on new tabs so it should fallback to using the one we were using. - Create custom XSLTs for lists, for example: $ cd /home/vagrant/kohaclone/koha-tmpl/opac-tmpl/bootstrap/en/xslt $ cp MARC21slim2OPACResults.xsl MARC21slim2OPACLists.xsl - Edit your sysprefs, setting OPACXSLTListsDisplay to: /home/vagrant/kohaclone/koha-tmpl/opac-tmpl/bootstrap/{langcode}/xslt/MARC21slim2OPACLists.xsl - Reload the OPAC list view - Make some minor tweak (for example in line 423 replace BLAH - Reload the list - Repeat for the staff interface - Sign off :-D --- C4/XSLT.pm | 12 ++++++++++++ opac/opac-shelves.pl | 4 ++-- virtualshelves/shelves.pl | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) --- a/C4/XSLT.pm +++ a/C4/XSLT.pm @@ -217,6 +217,18 @@ sub XSLTParse4Display { $theme = C4::Context->preference("opacthemes"); $xslfile = C4::Context->preference('marcflavour') . "slim2OPACResults.xsl"; + } elsif ($xslsyspref eq 'XSLTListsDisplay') { + # Lists default to *Results.xslt + $htdocs = C4::Context->config('intrahtdocs'); + $theme = C4::Context->preference("template"); + $xslfile = C4::Context->preference('marcflavour') . + "slim2intranetResults.xsl"; + } elsif ($xslsyspref eq 'OPACXSLTListsDisplay') { + # Lists default to *Results.xslt + $htdocs = C4::Context->config('opachtdocs'); + $theme = C4::Context->preference("opacthemes"); + $xslfile = C4::Context->preference('marcflavour') . + "slim2OPACResults.xsl"; } $xslfilename = _get_best_default_xslt_filename($htdocs, $theme, $lang, $xslfile); } --- a/opac/opac-shelves.pl +++ a/opac/opac-shelves.pl @@ -248,7 +248,7 @@ if ( $op eq 'view' ) { my $borrower = GetMember( borrowernumber => $loggedinuser ); - my $xslfile = C4::Context->preference('OPACXSLTResultsDisplay'); + my $xslfile = C4::Context->preference('OPACXSLTListsDisplay'); my $lang = $xslfile ? C4::Languages::getlanguage() : undef; my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; @@ -259,7 +259,7 @@ if ( $op eq 'view' ) { my $record = GetMarcBiblio($biblionumber); if ( $xslfile ) { - $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "OPACXSLTResultsDisplay", + $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "OPACXSLTListsDisplay", 1, undef, $sysxml, $xslfile, $lang); } --- a/virtualshelves/shelves.pl +++ a/virtualshelves/shelves.pl @@ -215,7 +215,7 @@ if ( $op eq 'view' ) { my $borrower = GetMember( borrowernumber => $loggedinuser ); - my $xslfile = C4::Context->preference('XSLTResultsDisplay'); + my $xslfile = C4::Context->preference('XSLTListsDisplay') || 'default'; my $lang = $xslfile ? C4::Languages::getlanguage() : undef; my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; @@ -226,7 +226,7 @@ if ( $op eq 'view' ) { my $record = GetMarcBiblio($biblionumber); if ( $xslfile ) { - $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "XSLTResultsDisplay", + $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "XSLTListsDisplay", 1, undef, $sysxml, $xslfile, $lang); } --