From 253d0a70ecd856fe80428449630103079a762207 Mon Sep 17 00:00:00 2001 From: Olli-Antti Kivilahti Date: Mon, 17 Mar 2014 13:33:23 +0200 Subject: [PATCH] Bug 11175 - Fixing component part injection for non-default XSL-templates Changed the Detailed-view detection to include also custom XSLTs'. Removed unnecessary checks. --- C4/XSLT.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 324e6ba..c18612a 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -172,7 +172,6 @@ sub XSLTParse4Display { $theme = C4::Context->preference("template"); $xslfile = C4::Context->preference('marcflavour') . "slim2intranetDetail.xsl"; - $shouldIPullInComponentPartRecords = 1; } elsif ($xslsyspref eq "XSLTResultsDisplay") { $htdocs = C4::Context->config('intrahtdocs'); $theme = C4::Context->preference("template"); @@ -183,7 +182,6 @@ sub XSLTParse4Display { $theme = C4::Context->preference("opacthemes"); $xslfile = C4::Context->preference('marcflavour') . "slim2OPACDetail.xsl"; - $shouldIPullInComponentPartRecords = 1; } elsif ($xslsyspref eq "OPACXSLTResultsDisplay") { $htdocs = C4::Context->config('opachtdocs'); $theme = C4::Context->preference("opacthemes"); @@ -198,6 +196,11 @@ sub XSLTParse4Display { $xslfilename =~ s/\{langcode\}/$lang/; } + ##Enable component part injection for Details XSLTs. + if ( $xslsyspref =~ m/Details/ ) { + $shouldIPullInComponentPartRecords = 1; + } + # grab the XML, run it through our stylesheet, push it out to the browser my $record = transformMARCXML4XSLT($biblionumber, $orig_record); -- 1.8.1.2