use MARC::File::XML;
use POSIX qw(strftime);
use Module::Load::Conditional qw(can_load);
+use URI;
+use URI::Escape; # GetCOinSBiblio
use C4::Koha;
use C4::Log; # logaction
carp 'GetCOinSBiblio called with undefined record';
return;
}
+
my $pos7 = substr $record->leader(), 7, 1;
my $pos6 = substr $record->leader(), 6, 1;
my $mtx;
my $genre;
my ( $aulast, $aufirst ) = ( '', '' );
- my $oauthors = '';
- my $title = '';
- my $subtitle = '';
+ my @authors;
+ my $title;
+ my $hosttitle;
my $pubyear = '';
my $isbn = '';
my $issn = '';
my $publisher = '';
my $pages = '';
- my $titletype = 'b';
+ my $titletype = '';
# For the purposes of generating COinS metadata, LDR/06-07 can be
# considered the same for UNIMARC and MARC21
- my $fmts6;
- my $fmts7;
- %$fmts6 = (
- 'a' => 'book',
- 'b' => 'manuscript',
- 'c' => 'book',
- 'd' => 'manuscript',
- 'e' => 'map',
- 'f' => 'map',
- 'g' => 'film',
- 'i' => 'audioRecording',
- 'j' => 'audioRecording',
- 'k' => 'artwork',
- 'l' => 'document',
- 'm' => 'computerProgram',
- 'o' => 'document',
- 'r' => 'document',
- );
- %$fmts7 = (
- 'a' => 'journalArticle',
- 's' => 'journal',
- );
+ my $fmts6 = {
+ 'a' => 'book',
+ 'b' => 'manuscript',
+ 'c' => 'book',
+ 'd' => 'manuscript',
+ 'e' => 'map',
+ 'f' => 'map',
+ 'g' => 'film',
+ 'i' => 'audioRecording',
+ 'j' => 'audioRecording',
+ 'k' => 'artwork',
+ 'l' => 'document',
+ 'm' => 'computerProgram',
+ 'o' => 'document',
+ 'r' => 'document',
+ };
+ my $fmts7 = {
+ 'a' => 'journalArticle',
+ 's' => 'journal',
+ };
$genre = $fmts6->{$pos6} ? $fmts6->{$pos6} : 'book';
##### We must transform mtx to a valable mtx and document type ####
if ( $genre eq 'book' ) {
$mtx = 'book';
+ $titletype = 'b';
} elsif ( $genre eq 'journal' ) {
$mtx = 'journal';
$titletype = 'j';
$mtx = 'dc';
}
- $genre = ( $mtx eq 'dc' ) ? "&rft.type=$genre" : "&rft.genre=$genre";
-
if ( C4::Context->preference("marcflavour") eq "UNIMARC" ) {
# Setting datas
$aulast = $record->subfield( '700', 'a' ) || '';
$aufirst = $record->subfield( '700', 'b' ) || '';
- $oauthors = "&rft.au=$aufirst $aulast";
+ push @authors, "$aufirst $aulast" if ($aufirst or $aulast);
# others authors
if ( $record->field('200') ) {
for my $au ( $record->field('200')->subfield('g') ) {
- $oauthors .= "&rft.au=$au";
+ push @authors, $au;
}
}
- $title =
- ( $mtx eq 'dc' )
- ? "&rft.title=" . $record->subfield( '200', 'a' )
- : "&rft.title=" . $record->subfield( '200', 'a' ) . "&rft.btitle=" . $record->subfield( '200', 'a' );
- $pubyear = $record->subfield( '210', 'd' ) || '';
+
+ $title = $record->subfield( '200', 'a' );
+ my $subfield_210d = $record->subfield('210', 'd');
+ if ($subfield_210d and $subfield_210d =~ /(\d{4})/) {
+ $pubyear = $1;
+ }
$publisher = $record->subfield( '210', 'c' ) || '';
$isbn = $record->subfield( '010', 'a' ) || '';
$issn = $record->subfield( '011', 'a' ) || '';
# Setting datas
if ( $record->field('100') ) {
- $oauthors .= "&rft.au=" . $record->subfield( '100', 'a' );
+ push @authors, $record->subfield( '100', 'a' );
}
# others authors
if ( $record->field('700') ) {
for my $au ( $record->field('700')->subfield('a') ) {
- $oauthors .= "&rft.au=$au";
+ push @authors, $au;
}
}
- $title = "&rft." . $titletype . "title=" . $record->subfield( '245', 'a' );
- $subtitle = $record->subfield( '245', 'b' ) || '';
- $title .= $subtitle;
+ $title = $record->subfield( '245', 'a' ) . $record->subfield( '245', 'b' );
if ($titletype eq 'a') {
$pubyear = $record->field('008') || '';
$pubyear = substr($pubyear->data(), 7, 4) if $pubyear;
$isbn = $record->subfield( '773', 'z' ) || '';
$issn = $record->subfield( '773', 'x' ) || '';
- if ($mtx eq 'journal') {
- $title .= "&rft.title=" . ( $record->subfield( '773', 't' ) || $record->subfield( '773', 'a') || q{} );
- } else {
- $title .= "&rft.btitle=" . ( $record->subfield( '773', 't' ) || $record->subfield( '773', 'a') || q{} );
- }
- foreach my $rel ($record->subfield( '773', 'g' )) {
- if ($pages) {
- $pages .= ', ';
- }
- $pages .= $rel;
- }
+ $hosttitle = $record->subfield( '773', 't' ) || $record->subfield( '773', 'a') || q{};
+ my @rels = $record->subfield( '773', 'g' );
+ $pages = join(', ', @rels);
} else {
$pubyear = $record->subfield( '260', 'c' ) || '';
$publisher = $record->subfield( '260', 'b' ) || '';
}
}
- my $coins_value =
-"ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3A$mtx$genre$title&rft.isbn=$isbn&rft.issn=$issn&rft.aulast=$aulast&rft.aufirst=$aufirst$oauthors&rft.pub=$publisher&rft.date=$pubyear&rft.pages=$pages";
- $coins_value =~ s/(\ |&[^a])/\+/g;
- $coins_value =~ s/\"/\"\;/g;
-#<!-- TMPL_VAR NAME="ocoins_format" -->&rft.au=<!-- TMPL_VAR NAME="author" -->&rft.btitle=<!-- TMPL_VAR NAME="title" -->&rft.date=<!-- TMPL_VAR NAME="publicationyear" -->&rft.pages=<!-- TMPL_VAR NAME="pages" -->&rft.isbn=<!-- TMPL_VAR NAME=amazonisbn -->&rft.aucorp=&rft.place=<!-- TMPL_VAR NAME="place" -->&rft.pub=<!-- TMPL_VAR NAME="publishercode" -->&rft.edition=<!-- TMPL_VAR NAME="edition" -->&rft.series=<!-- TMPL_VAR NAME="series" -->&rft.genre="
+ my @params = (
+ [ 'ctx_ver', 'Z39.88-2004' ],
+ [ 'rft_val_fmt', "info:ofi/fmt:kev:mtx:$mtx" ],
+ [ ($mtx eq 'dc' ? 'rft.type' : 'rft.genre'), $genre ],
+ [ "rft.${titletype}title", $title ],
+ );
+
+ # rft.title is authorized only once, so by checking $titletype
+ # we ensure that rft.title is not already in the list.
+ if ($hosttitle and $titletype) {
+ push @params, [ 'rft.title', $hosttitle ];
+ }
+
+ push @params, (
+ [ 'rft.isbn', $isbn ],
+ [ 'rft.issn', $issn ],
+ );
+
+ # If it's a subscription, these informations have no meaning.
+ if ($genre ne 'journal') {
+ push @params, (
+ [ 'rft.aulast', $aulast ],
+ [ 'rft.aufirst', $aufirst ],
+ (map { [ 'rft.au', $_ ] } @authors),
+ [ 'rft.pub', $publisher ],
+ [ 'rft.date', $pubyear ],
+ [ 'rft.pages', $pages ],
+ );
+ }
+
+ my $coins_value = join( '&',
+ map { $$_[1] ? $$_[0] . '=' . uri_escape_utf8( $$_[1] ) : () } @params );
return $coins_value;
}
+sub GetOpenURLResolverURL {
+ my ($record) = @_;
+
+ my $coins = GetCOinSBiblio($record);
+ my $OpenURLResolverURL = C4::Context->preference('OpenURLResolverURL');
+
+ if ($OpenURLResolverURL) {
+ my $uri = URI->new($OpenURLResolverURL);
+
+ if (not defined $uri->query) {
+ $OpenURLResolverURL .= '?';
+ } else {
+ $OpenURLResolverURL .= '&';
+ }
+ $OpenURLResolverURL .= $coins;
+ }
+
+ return $OpenURLResolverURL;
+}
+
=head2 GetMarcPrice
OPACItemLocation DisplayIconsXSLT
AlternateHoldingsField AlternateHoldingsSeparator
TrackClicks opacthemes IdRef OpacSuppression
- OPACResultsLibrary / )
+ OPACResultsLibrary OPACShowOpenURL
+ OpenURLResolverURL OpenURLImageLocation
+ OpenURLText / )
{
my $sp = C4::Context->preference( $syspref );
next unless defined($sp);
}
sub XSLTParse4Display {
- my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang ) = @_;
+ my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang, $variables ) = @_;
$sysxml ||= C4::Context->preference($xslsyspref);
$xslfilename ||= C4::Context->preference($xslsyspref);
my $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items);
my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
- $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/;
- if ($fixamps) { # We need to correct the HTML entities that Zebra outputs
+ $variables ||= {};
+ if (C4::Context->preference('OPACShowOpenURL')) {
+ my ($biblio) = GetBiblioItemByBiblioNumber($biblionumber);
+ my @itypes = split( /\s/, C4::Context->preference('OPACOpenURLItemTypes') );
+ if (grep /^$biblio->{itemtype}$/, @itypes) {
+ $variables->{OpenURLResolverURL} =
+ C4::Biblio::GetOpenURLResolverURL($orig_record);
+ }
+ }
+ my $varxml = "<variables>\n";
+ while (my ($key, $value) = each %$variables) {
+ $varxml .= "<variable name=\"$key\">$value</variable>\n";
+ }
+ $varxml .= "</variables>\n";
+
+ $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml$varxml\<\/record\>/;
+ if ($fixamps) { # We need to correct the ampersand entities that Zebra outputs
$xmlrecord =~ s/\&amp;/\&/g;
$xmlrecord =~ s/\&\;lt\;/\<\;/g;
$xmlrecord =~ s/\&\;gt\;/\>\;/g;
--- /dev/null
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES
+ ('OpenURLResolverURL', '', 'URL of OpenURL Resolver', NULL, 'Free'),
+ ('OpenURLText', '', 'Text of OpenURL links (or image title if OpenURLImageLocation is defined)', NULL, 'Free'),
+ ('OpenURLImageLocation', '', 'Location of image for OpenURL links', NULL, 'Free'),
+ ('OPACShowOpenURL', '', 'Enable display of OpenURL links in OPAC search results and detail page', NULL, 'YesNo'),
+ ('OPACOpenURLItemTypes', '', 'Show the OpenURL link only for these item types', NULL, 'Free');
('OPACXSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on OPAC','Free'),
('OpenLibraryCovers','0',NULL,'If ON Openlibrary book covers will be show','YesNo'),
('OpenLibrarySearch','0',NULL,'If Yes Open Library search results will show in OPAC','YesNo'),
+('OpenURLResolverURL', '', NULL, 'URL of OpenURL Resolver', 'Free'),
+('OpenURLText', '', NULL, 'Text of OpenURL links (or image title if OpenURLImageLocation is defined)', 'Free'),
+('OpenURLImageLocation', '', NULL, 'Location of image for OpenURL links', 'Free'),
+('OPACShowOpenURL', '', NULL, 'Enable display of OpenURL links in OPAC search results and detail page', 'YesNo'),
+('OPACOpenURLItemTypes', '', NULL, 'Show the OpenURL link only for these item types', 'Free'),
('OrderPdfFormat','pdfformat::layout3pages','Controls what script is used for printing (basketgroups)','','free'),
('OrderPriceRounding','','|nearest_cent','Local preference for rounding orders before calculations to ensure correct calculations','Choice'),
('OverDriveCirculation','0','Enable client to see their OverDrive account','','YesNo'),
yes: Include
no: "Don't include"
- "COinS / OpenURL / Z39.88 in OPAC search results. <br/>Warning: Enabling this feature will slow OPAC search response times."
+ - "<br/>If you want to display a link to an OpenURL resolver, look at the following system preferences:"
+ - "<br/><code>OpenURLResolverURL</code>, <code>OPACShowOpenURL</code>, <code>OPACOpenURLItemTypes</code>, <code>OpenURLText<code>, <code>OpenURLImageLocation</code>"
-
- pref: OPACShowUnusedAuthorities
choices:
type: textarea
syntax: text/html
class: code
+ OpenURL:
+ -
+ - 'Complete URL of OpenURL resolver (starting with <code>http://</code> or <code>https://</code>):'
+ - pref: OpenURLResolverURL
+ class: url
+ -
+ - 'Text of OpenURL links (or image title if OpenURLImageLocation is defined):'
+ - pref: OpenURLText
+ -
+ - 'Location of image for OpenURL links:'
+ - pref: OpenURLImageLocation
+ class: url
+ - '<br />Can be an absolute URL starting with <code>http://</code> or'
+ - '<code>https://</code> or a relative URL'
+ - '<br />Examples:'
+ - '<br />- <code>http://www.example.com/img/openurl.png</code>'
+ - '<br />- <code>/opac-tmpl/bootstrap/images/OpenURL.png</code>'
+ -
+ - pref: OPACShowOpenURL
+ choices:
+ yes: Enable
+ no: Disable
+ - 'display of OpenURL link in OPAC search results and detail page.'
+ -
+ - 'List of item type codes (separated by spaces) for those you want to show the OpenURL link:'
+ - pref: OPACOpenURLItemTypes
+ - '<br />'
Policy:
-
- pref: SearchMyLibraryFirst
text-decoration: none;
}
+ &.OpenURL img {
+ vertical-align: middle;
+ }
+
&.addtocart {
@extend %initial_icon;
background-position: -5px -262px; /* Cart */
</xsl:for-each>
</xsl:if>
+ <!-- OpenURL -->
+ <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
+ <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
+ <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
+ <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
+
+ <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
+ <xsl:variable name="openurltext">
+ <xsl:choose>
+ <xsl:when test="$OpenURLText != ''">
+ <xsl:value-of select="$OpenURLText" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>OpenURL</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <span class="results_summary"><a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$OpenURLResolverURL" />
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:value-of select="$openurltext" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>OpenURL</xsl:text>
+ </xsl:attribute>
+ <xsl:if test="$OPACURLOpenInNewWindow='1'">
+ <xsl:attribute name="target">
+ <xsl:text>_blank</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$OpenURLImageLocation != ''">
+ <img>
+ <xsl:attribute name="src">
+ <xsl:value-of select="$OpenURLImageLocation" />
+ </xsl:attribute>
+ </img>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$openurltext" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </a></span>
+ </xsl:if>
+ <!-- End of OpenURL -->
+
</xsl:element>
</xsl:template>
</xsl:for-each>
</xsl:if>
</a>
- <p>
+ <!-- OpenURL -->
+ <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
+ <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
+ <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
+ <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
+
+ <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
+ <xsl:variable name="openurltext">
+ <xsl:choose>
+ <xsl:when test="$OpenURLText != ''">
+ <xsl:value-of select="$OpenURLText" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>OpenURL</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <span class="results_summary"><a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$OpenURLResolverURL" />
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:value-of select="$openurltext" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>OpenURL</xsl:text>
+ </xsl:attribute>
+ <xsl:if test="$OPACURLOpenInNewWindow='1'">
+ <xsl:attribute name="target">
+ <xsl:text>_blank</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$OpenURLImageLocation != ''">
+ <img>
+ <xsl:attribute name="src">
+ <xsl:value-of select="$OpenURLImageLocation" />
+ </xsl:attribute>
+ </img>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$openurltext" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </a></span>
+ </xsl:if>
+ <!-- End of OpenURL -->
+
+ <p>
<!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
<xsl:if test="$display880">
<xsl:call-template name="m880Select">
</xsl:for-each>
</span>
</xsl:if>
+
+ <!-- OpenURL -->
+ <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
+ <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
+ <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
+ <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
+
+ <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
+ <xsl:variable name="openurltext">
+ <xsl:choose>
+ <xsl:when test="$OpenURLText != ''">
+ <xsl:value-of select="$OpenURLText" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>OpenURL</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <span class="results_summary"><a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$OpenURLResolverURL" />
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:value-of select="$openurltext" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>OpenURL</xsl:text>
+ </xsl:attribute>
+ <xsl:if test="$OPACURLOpenInNewWindow='1'">
+ <xsl:attribute name="target">
+ <xsl:text>_blank</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$OpenURLImageLocation != ''">
+ <img>
+ <xsl:attribute name="src">
+ <xsl:value-of select="$OpenURLImageLocation" />
+ </xsl:attribute>
+ </img>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$openurltext" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </a></span>
+ </xsl:if>
+ <!-- End of OpenURL -->
+
</xsl:template>
<xsl:template name="nameABCDQ">
</xsl:for-each>
</xsl:if>
+ <!-- OpenURL -->
+ <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
+ <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
+ <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
+ <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
+
+ <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
+ <xsl:variable name="openurltext">
+ <xsl:choose>
+ <xsl:when test="$OpenURLText != ''">
+ <xsl:value-of select="$OpenURLText" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>OpenURL</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <span class="results_summary"><a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$OpenURLResolverURL" />
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:value-of select="$openurltext" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>OpenURL</xsl:text>
+ </xsl:attribute>
+ <xsl:if test="$OPACURLOpenInNewWindow='1'">
+ <xsl:attribute name="target">
+ <xsl:text>_blank</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$OpenURLImageLocation != ''">
+ <img>
+ <xsl:attribute name="src">
+ <xsl:value-of select="$OpenURLImageLocation" />
+ </xsl:attribute>
+ </img>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$openurltext" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </a></span>
+ </xsl:if>
+ <!-- End of OpenURL -->
+
<xsl:call-template name="tag_title">
<xsl:with-param name="tag">454</xsl:with-param>
<xsl:with-param name="label">Translation of</xsl:with-param>
## parse the limit_cgi string and put it into a form suitable for <input>s
my @limit_inputs = $limit_cgi ? _input_cgi_parse($limit_cgi) : ();
+# OpenURL
+my @OpenURL_itypes;
+if (C4::Context->preference('OPACShowOpenURL')) {
+ @OpenURL_itypes = split( /\s/, C4::Context->preference('OPACOpenURLItemTypes') );
+ $template->param(
+ OPACShowOpenURL => 1,
+ OpenURLResolverURL => C4::Context->preference('OpenURLResolverURL'),
+ OpenURLText => C4::Context->preference('OpenURLText'),
+ OpenURLImageLocation => C4::Context->preference('OpenURLImageLocation')
+ );
+}
+
$template->param ( LIMIT_INPUTS => \@limit_inputs );
$template->param ( OPACResultsSidebar => C4::Context->preference('OPACResultsSidebar'));