|
Lines 32-37
use Koha::RecordProcessor;
Link Here
|
| 32 |
use Koha::XSLT::Base; |
32 |
use Koha::XSLT::Base; |
| 33 |
use Koha::Libraries; |
33 |
use Koha::Libraries; |
| 34 |
use Koha::Recalls; |
34 |
use Koha::Recalls; |
|
|
35 |
use Koha::TemplateUtils qw( process_tt ); |
| 35 |
|
36 |
|
| 36 |
my $engine; #XSLT Handler object |
37 |
my $engine; #XSLT Handler object |
| 37 |
|
38 |
|
|
Lines 238-243
sub XSLTParse4Display {
Link Here
|
| 238 |
$variables->{OpenURLResolverURL} = $biblio->get_openurl; |
239 |
$variables->{OpenURLResolverURL} = $biblio->get_openurl; |
| 239 |
} |
240 |
} |
| 240 |
} |
241 |
} |
|
|
242 |
my $extracontentxml = ''; |
| 243 |
|
| 244 |
# Check if we should add extra content based on system preference |
| 245 |
if ( C4::Context->preference('ExtraContentForXSLTDisplay') ) { |
| 246 |
my $extracontentvalue = C4::Context->preference('ExtraContentForXSLTDisplay'); |
| 247 |
my $extracontentproccessed = process_tt( $extracontentvalue, { record => $record } ); |
| 248 |
$extracontentxml = "<extracontent><content>" . $extracontentproccessed . "</content></extracontent>"; |
| 249 |
} |
| 241 |
|
250 |
|
| 242 |
# embed variables |
251 |
# embed variables |
| 243 |
my $varxml = "<variables>\n"; |
252 |
my $varxml = "<variables>\n"; |
|
Lines 248-254
sub XSLTParse4Display {
Link Here
|
| 248 |
$varxml .= "</variables>\n"; |
257 |
$varxml .= "</variables>\n"; |
| 249 |
|
258 |
|
| 250 |
my $sysxml = get_xslt_sysprefs(); |
259 |
my $sysxml = get_xslt_sysprefs(); |
| 251 |
$xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml$varxml\<\/record\>/; |
260 |
$xmlrecord =~ s/\<\/record\>/$itemsxml$extracontentxml$sysxml$varxml\<\/record\>/; |
| 252 |
if ($fixamps) { # We need to correct the ampersand entities that Zebra outputs |
261 |
if ($fixamps) { # We need to correct the ampersand entities that Zebra outputs |
| 253 |
$xmlrecord =~ s/\&amp;/\&/g; |
262 |
$xmlrecord =~ s/\&amp;/\&/g; |
| 254 |
$xmlrecord =~ s/\&\;lt\;/\<\;/g; |
263 |
$xmlrecord =~ s/\&\;lt\;/\<\;/g; |