From ba0eccdf8d691dbe6afd7b3735ffac8f81df1e55 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 4 Sep 2019 17:42:02 +0000 Subject: [PATCH] Bug 22880: (follow-up) Define OpacHeader variable for conditional This follow-up uses the updates introduced by Bug 23253 as a model for improving the display of opacheader. Adding the OpacHeader variable allows the template to check for its existence and display some container markup around opacheader if it exists. This will help ease the transition for libraries who depend on the #opacheader id for styling. To test, apply the patch and test the OPAC with an 'opacheader' item defined. The content should be displayed on the page inside '
.' Delete the 'opacheader' news item and reload the OPAC page. There should no longer be an #opacheader div. Signed-off-by: Hayley Mapley Signed-off-by: Lisette Scheer Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize --- .../opac-tmpl/bootstrap/en/includes/masthead.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 84d884a64a..af23e481ee 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -4,7 +4,7 @@ [% USE Categories %] [% USE KohaNews %] [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] -[% SET OpacHeader = KohaNews.get( location => "opacheader", lang => lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacHeader = KohaNews.get( location => "opacheader", lang => news_lang, library => branchcode, blocktitle => 0 ) %]
- [% PROCESS koha_news_block news => KohaNews.get( location => "opacheader", lang => news_lang, library => branchcode, blocktitle => 0 ) %] + [% IF ( OpacHeader ) %] +
+
+
+ [% PROCESS koha_news_block news => OpacHeader %] +
+
+
+ [% END %]
-- 2.39.5