@@ -, +, @@ http://localhost:8080/cgi-bin/koha/opac-main.pl?news_id=12 --- Koha/Template/Plugin/AdditionalContents.pm | 23 ++++ .../bootstrap/en/modules/opac-main.tt | 107 +++++++++--------- opac/opac-main.pl | 24 +--- 3 files changed, 78 insertions(+), 76 deletions(-) --- a/Koha/Template/Plugin/AdditionalContents.pm +++ a/Koha/Template/Plugin/AdditionalContents.pm @@ -55,6 +55,29 @@ sub get { } } +sub get_news_id { + my ( $self, $params ) = @_; + + my $idnew = $params->{idnew}; + my $location = ['opac_only', 'staff_and_opac']; + my $blocktitle = $params->{blocktitle}; + + my $content = Koha::AdditionalContents->search( + { + location => $location, + idnew => $idnew, + } + ); + + if ( $content->count ) { + return { + content => $content, + location => $location, + blocktitle => $blocktitle + }; + } +} + 1; =head1 NAME --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -71,7 +71,7 @@