@@ -, +, @@ will inevitably be blank On Hold or In transit items; it doesn't really make sense, since the items aren't actually there, and it results in repetitive listing of the shelving location results. The system preference is called OpacItemLocation. I also moved the call number to a new line called Location along with the shelving location if it is enabled. 1) Run database update script to add syspref. 2) Set OpacItemLocation to show locations or collection codes on the opac-search page. If it is working you should see the shelving location of the item before the call number. Multiple home branch shelving locations are seperated by a pipe character ( i.e. '|' ). --- C4/XSLT.pm | 14 ++++- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++ .../prog/en/modules/admin/preferences/opac.pref | 8 +++ .../prog/en/xslt/MARC21slim2OPACResults.xsl | 56 +++++++++++++------- 5 files changed, 65 insertions(+), 21 deletions(-) --- a/C4/XSLT.pm +++ a/C4/XSLT.pm @@ -188,7 +188,7 @@ sub XSLTParse4Display { UseAuthoritiesForTracings TraceSubjectSubdivisions Display856uAsImage OPACDisplay856uAsImage UseControlNumber IntranetBiblioDefaultView BiblioDefaultView - singleBranchMode + singleBranchMode OPACItemLocation AlternateHoldingsField AlternateHoldingsSeparator / ) { my $sp = C4::Context->preference( $syspref ); @@ -232,8 +232,14 @@ sub buildKohaItemsNamespace { my %hi = map {$_ => 1} @$hidden_items; @items = grep { !$hi{$_->{itemnumber}} } @items; } + + my $shelflocations = GetKohaAuthorisedValues('items.location',GetFrameworkCode($biblionumber), 'opac'); + my $ccodes = GetKohaAuthorisedValues('items.ccode',GetFrameworkCode($biblionumber), 'opac'); + my $branches = GetBranches(); my $itemtypes = GetItemTypes(); + my $location = ""; + my $ccode = ""; my $xml = ''; for my $item (@items) { my $status; @@ -272,8 +278,12 @@ sub buildKohaItemsNamespace { $status = "available"; } my $homebranch = $item->{homebranch}? xml_escape($branches->{$item->{homebranch}}->{'branchname'}):''; - my $itemcallnumber = xml_escape($item->{itemcallnumber}); + $location = xml_escape($shelflocations->{$item->{location}}); + $ccode = xml_escape($ccodes->{$item->{ccode}}); + my $itemcallnumber = xml_escape($item->{itemcallnumber}); $xml.= "$homebranch". + "$location". + "$ccode". "$status". "".$itemcallnumber."" . ""; --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -406,3 +406,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free'); INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserCSS', '', NULL, 'Add CSS to be included in the SCO module in an embedded