Create web pages in Koha (Koha as a CMS)

Users can publish pages on Koha OPAC  and OPAC can act as a tiny library web site. I have tried this feature on Koha 3.22.10 version. Very detailed documentation available at Koha Wiki. Here is Koha OPAC with few pages;
A page in OPAC to describe library collection.

Edit file
Open Applications > Accessories > Terminal

sudo su
cd /usr/share/koha/opac/cgi-bin/opac

Open following file,

leafpad /usr/share/koha/opac/cgi-bin/opac/

Find following line,

Line 34 (Approximately)

Comment following line by adding #

#template_name  => "opac-main.tmpl",

Add the following line below,

template_name  => "",

Find following piece of code, line 60 (Approximately)

           koha_news       => $all_koha_news,
           koha_news_count => $koha_news_count,
           display_daily_quote => C4::Context->preference('QuoteOfTheDay'),
           daily_quote         => $quote,

Add following piece of code below,

my $page = "page_" . $input->param('p');            # go for "p" value in URL and do the concatenation
           my $preference = C4::Context->preference($page);    # Go for preference 
           $template->{VARS}->{'page_test'} = $preference;     # pass variable to template

Save and close the file.

Change user permission of file,

chmod 755

Editing the pages template
Make copy of and rename it to

cd /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/modules


Open file in a text editor;

leafpad /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/modules/

Find following pice of code at line 68 (approximately)

[% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock">[% OpacMainUserBlock %]</div>[% END %]

Replace with following lines,

[% IF ( page_test ) %]<div id="opacmainuserblock">[% page_test %]</div>[% END %]

Save and close the file.

Open following file,

sudo leafpad /etc/koha/apache-shared.conf

Add following line at line 12,

ScriptAlias / "/usr/share/koha/opac/cgi-bin/opac/"

Save and close the file.

Restart Apache

/etc/init.d/apache2 restart

Create first page
Koha > Administration >  System preferences > Local use < New preference

Create a sample page.
Add more pages by creating new system preference. The page title should begin with "page_" (e.g. page_collection).

Try new page on browser

You can place links anywhere in Koha.
For exmaple, links on left side of OPAC.

Add following  HTML tag in System Preferences > OPAC > opacnav

<a href="">Services</a>

The page link will appear in OPAC left navigation space.

Koha as a CMS


  1. good initiative.congrats

    college librarian,p k m college of education,madampam,kannur

  2. is this feature possible in koha version 3.16

  3. Thanks for sharing this valuable information..keep posting...

    barcode software

  4. is this feature possible in koha 3.10 version

    1. Possible with Koha 3.10. But better to upgrade to latest version.