@@ -, +, @@ - Set the OPACXSLTResultsDisplay system preference to 'default' - Log in to the OPAC and view the "your tags" page. - Confirm that title information is displayed correctly. Compare to search results. - Empty the OPACXSLTResultsDisplay system preference and reload the "your tags" page. The display should revert to the old view, showing title, subtitle (if any) and author (if any). - Set the OPACXSLTResultsDisplay to a custom path pointing to a custom XSL file and confirm that the list of your tagged titles changes accordingly. --- .../opac-tmpl/bootstrap/en/modules/opac-tags.tt | 22 ++++++++++++++++++---- opac/opac-tags.pl | 4 ++++ 2 files changed, 22 insertions(+), 4 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt @@ -113,7 +113,7 @@ [% IF ( MY_TAGS ) %]
-

My Tags

+

Your tags

@@ -124,9 +124,23 @@ [% MY_TAG.term |html %] + [% IF ( MY_TAG.XSLTBloc ) %] + [% MY_TAG.XSLTBloc %] + [% ELSE %] + Title: + + [% MY_TAG.title |html %] + [% IF ( MY_TAG.subtitle ) %] + [% FOREACH subtitle IN MY_TAG.subtitle %] + [% subtitle.subfield |html %] + [% END %] + [% END %] + + [% IF ( MY_TAG.author ) %] + by [% MY_TAG.author %] + [% END %] + [% END # /IF MY_TAG.XSLTBloc %] +
TermTitleDate addedDelete
- Title: - - [% MY_TAG.title |html %][% IF ( MY_TAG.subtitle ) %][% FOREACH subtitle IN MY_TAG.subtitle %] [% subtitle.subfield |html %][% END %][% END %] [% IF ( MY_TAG.author ) %]by [% MY_TAG.author %][% END %] Date added: --- a/opac/opac-tags.pl +++ a/opac/opac-tags.pl @@ -42,6 +42,7 @@ use C4::Output qw(:html :ajax pagination_bar); use C4::Scrubber; use C4::Biblio; use C4::Tags qw(add_tag get_approval_rows get_tag_rows remove_tag stratify_tags); +use C4::XSLT; use Data::Dumper; @@ -232,6 +233,9 @@ if ($loggedinuser) { $_->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $_->{biblionumber} ) ); $_->{title} = $biblio->{title}; $_->{author} = $biblio->{author}; + if (C4::Context->preference("OPACXSLTResultsDisplay")) { + $_->{XSLTBloc} = XSLTParse4Display($_->{biblionumber}, $record, "OPACXSLTResultsDisplay"); + } my $date = $_->{date_created} || ''; $date =~ /\s+(\d{2}\:\d{2}\:\d{2})/; $_->{time_created_display} = $1; --