Bug 12806 - Adding 'Koha as a CMS' to the OPAC
Summary: Adding 'Koha as a CMS' to the OPAC
Status: RESOLVED DUPLICATE of bug 15326
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low new feature (vote)
Assignee: Indranil Das Gupta
QA Contact: Testopia
URL:
Keywords:
: 15999 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-08-22 02:05 UTC by Indranil Das Gupta
Modified: 2019-03-14 07:24 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Koha as a CMS patch for bootstrap OPAC theme (8.50 KB, patch)
2014-08-22 02:41 UTC, Indranil Das Gupta
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Indranil Das Gupta 2014-08-22 02:05:12 UTC
This patch implements the simple "Koha as a CMS" feature as described in both Koha manual and the community wiki.

http://wiki.koha-community.org/wiki/Koha_as_a_CMS.
Comment 1 Indranil Das Gupta 2014-08-22 02:14:17 UTC
This patch implements the simple "Koha as a CMS" feature as described in both Koha manual and the community wiki, for the 'bootstrap' OPAC theme.

http://wiki.koha-community.org/wiki/Koha_as_a_CMS.
Comment 2 Indranil Das Gupta 2014-08-22 02:41:25 UTC
Created attachment 31068 [details] [review]
Koha as a CMS patch for bootstrap OPAC theme
Comment 3 Marcel de Rooy 2014-08-22 07:18:14 UTC
Indranil: Interesting patch! I wonder if we should move the page contents to another database table instead of putting them in the preferences? You would only need an extra form to handle CRUD ops. It would make translation of these local pages easier too.
Comment 4 Jonathan Druart 2014-08-22 07:22:40 UTC
Why do you want to add these files into the Koha src?
What append if a library has already created these files (pages.pl and pages.tt)? I know the answer: Boom :)
Comment 5 Viktor Sarge 2014-08-22 07:31:06 UTC
+1 for shipping the needed .tt-files with a standard install in general. If I remember correctly that would it possible for IT-librarians to activate CMS-mode without having to ask the admin to manhandle any files on the server.

"Boom" should be avoided of course :)
Comment 6 Indranil Das Gupta 2014-08-22 07:47:10 UTC
(In reply to Jonathan Druart from comment #4)
> Why do you want to add these files into the Koha src?

Jonathan: The "Koha as a CMS" as it has existed in the wiki and manual (Appendix E) is essentially an user-driven hack. There has been discussion before http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7840 about integrating it.

This is a feature I use a bit, and when I wrote a small KPZ plugin to provide the WYSIWYG feature for CMS add/edit window, it seemed work well. However, apparently people who wanted to use it had trouble with the pages.tt / pages.pl hand edits. 

> What append if a library has already created these files (pages.pl and
> pages.tt)? I know the answer: Boom :)

So, this patch was the next step to make user adoption more seamless. I assume, that if @Marcel's suggestion in included and the pages namespace is re-defined, then there should be no reason for a BLAST? :-)
Comment 7 Indranil Das Gupta 2014-08-22 07:51:32 UTC
(In reply to M. de Rooy from comment #3)
> Indranil: Interesting patch! I wonder if we should move the page contents to
> another database table instead of putting them in the preferences? You would
> only need an extra form to handle CRUD ops. It would make translation of
> these local pages easier too.

Marcel: I think I can manage that! Right now I had written a simple KPZ to take care of things on that side. I'm sure I can re-factor that.

https://github.com/l2c2technologies/KohaCMS/releases/tag/1.2.2
Comment 8 Gaetan Boisson 2015-06-23 16:23:23 UTC
This sounds like a good idea to me!
Comment 9 David Cook 2015-06-23 23:33:55 UTC
We have a local patch for "Koha as a CMS", so I should take a look at this as well...
Comment 10 David Cook 2015-06-23 23:38:49 UTC
Comment on attachment 31068 [details] [review]
Koha as a CMS patch for bootstrap OPAC theme

Review of attachment 31068 [details] [review]:
-----------------------------------------------------------------

At a glance, we've implemented this in a very different way. We might want to add lots more IDs and classes so that libraries can have more control of what they hide/show on these extra pages. Most libraries we have don't want to see news, quotes, login boxes, etc on their "pages".

::: koha-tmpl/opac-tmpl/bootstrap/en/modules/pages.tt
@@ +45,5 @@
> +                </div>
> +            </div>
> +        [% END %]
> +
> +        [% IF ( page_test ) %]<div id="opacmainuserblock">[% page_test %]</div>[% END %]

Might a better variable name be "page_text" rather than "page_test"?
Comment 11 Viktor Sarge 2015-06-24 05:16:59 UTC
I haven't written an RFC for it yet but we are very much wanting to add a proper way to do this that also gives you navigation for the pages. We are thinking about doing it this way: 

* Add something under "Tools" where you create the pages and put them in the right hierarchy. When you create a page you are also prompted to fill out all the same areas as opac-main but done with TinyMCE. 

* Navigation in Opac is automatically created to mirror the above mentioned hierarchy. I'm suggesting first level to be tabs like the one Owen blogged about at http://www.myacpl.org/koha/new-opac-theme-bootstrap/ Level 2,3 etc would perhaps be best as left hand navigation on larger screens. 

* Move all existing html in sysprefs into the new system and delete the sysprefs that require coding skills. 

* Add a way to create standalone "widgets" that can be displayed on multiple pages. Either html content or things that run code (like exposing content form RSS-streams or data from reports) 

I'd say the best solution for storing the necessary information would be a new table like html_content. The table opac_news mostly does what is needed but would have to be renamed. A new general purpose one seems better and then we could a few columns like "type" classification or "location" 

The thing that both I and the developer I'm talking with the most here have to look into is URLs. We would like nice looking URLs like "cgi-bin/koha/our-libraries.pl" instead of "cgi-bin/koha/page.pl?name=our-libraries". I'm not quite shure what the best approach for that might be.

All input would be valuable and I guess I should really file an RFC and create a separate thread for this. The work on this might start during july/august but currently he is working on history for MARC records.
Comment 12 Gaetan Boisson 2015-07-03 09:31:12 UTC
Does this need to remain in discussion?
Comment 13 Gaetan Boisson 2015-10-12 09:25:43 UTC
I am still very much in favor of brining this into master, even in a very unpolished way that will allow us to build upon later. Fridolin has done a POC in bug 14980.
Comment 14 Kyle M Hall 2016-03-07 18:35:22 UTC
*** Bug 15999 has been marked as a duplicate of this bug. ***
Comment 15 Katrin Fischer 2019-03-12 00:07:29 UTC
A slightly different approach, using the news system istead of system preferences: bug 15326

*** This bug has been marked as a duplicate of bug 15326 ***