From 9921e8c1d6ee7512809538e9238877b6dc664a01 Mon Sep 17 00:00:00 2001 From: Indranil Das Gupta Date: Fri, 8 Aug 2014 03:35:06 +0000 Subject: [PATCH] Bug 12735: Koha as a CMS manual entry does not reflect bootstrap template usage Patch adds bootstrap template instructions to the 3.14 manual entry kohacms.html --- en/manual.xml | 82 ++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 64 insertions(+), 18 deletions(-) diff --git a/en/manual.xml b/en/manual.xml index 17a61a9..01f4147 100644 --- a/en/manual.xml +++ b/en/manual.xml @@ -44955,7 +44955,7 @@ Items : - At approximately line 36 change this code: + At approximately line 33 change this code: template_name => "opac-main.tt", @@ -44967,10 +44967,12 @@ Items : - At approximately line 54 after this code: + At approximately line 62 after this code: $template->param( koha_news => $all_koha_news, - koha_news_count => $koha_news_count + koha_news_count => $koha_news_count, + display_daily_quote => C4::Context->preference('QuoteOfTheDay'), + daily_quote => $quote, ); @@ -44984,23 +44986,67 @@ Items : Note pages.pl file must have Webserver user execution permissions, you can use chmod command if you are actually logged in as such user: - $chmod 711 pages.pl - - - - Copy /usr/share/koha/opac/htdocs/opac-tmpl/prog/en/modules/opac-main.tt to - /usr/share/koha/opac/htdocs/opac-tmpl/prog/en/modules/pages.tt - - - Edit /usr/share/koha/opac/htdocs/opac-tmpl/prog/en/modules/pages.tt - - - At approximately line 38, change this: - [% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock" class="container">[% OpacMainUserBlock %]</div>[% END %] - To this: - [% IF ( page_test ) %]<div id="opacmainuserblock" class="container">[% page_test %]</div>[% END %] + $chmod 755 pages.pl +
+ Editing the pages template + The file to create / edit for the pages template will depend on your opacthemes system preference setting i.e. bootstrap or prog (deprecated) or ccsr (deprecated) +
+ Editing 'bootstrap' theme template (current) + + + Copy /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/modules/opac-main.tt to /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/modules/pages.tt + + + Edit /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/modules/pages.tt + + + At approximately line 61, change this: + [% IF ( OpacMainUserBlock ) %]
[% OpacMainUserBlock %]
[% END %]
+
+ + To this: + [% IF ( page_test ) %]
[% page_test %]
[% END %]
+
+
+ Remark: You may wish to disable your News block of these CMS style pages e.g. when you do not want it displayed on the CMS style pages or where the News block is long enough that it actually makes the 'page_test' include scroll outside the default viewport dimensions. In that case, remove the following code from your pages.tt template. + + [% IF ( koha_news_count ) %] +
+ + [% FOREACH koha_new IN koha_news %] + + + [% END %] +
[% koha_new.title %]

[% koha_new.new %]

+

(published on [% koha_new.newdate %])

+
+ [% END %] +
+
+
+
+ Editing 'prog' theme template (deprecated) + + + Copy /usr/share/koha/opac/htdocs/opac-tmpl/prog/en/modules/opac-main.tt to /usr/share/koha/opac/htdocs/opac-tmpl/prog/en/modules/pages.tt + + + Edit /usr/share/koha/opac/htdocs/opac-tmpl/prog/en/modules/pages.tt + + + At approximately line 40, change this: +
[% OpacMainUserBlock %]
+
+ + To this: +
[% page_test %]
+
+
+
+
+ In the browser go to Home > Administration > System Preferences > Local Use and add a New Preference called "page_test" -- 1.8.1.2