Extension CKAN Pages


Extension Basics

Title
CKAN Pages
Name
ckanext-pages
Type
Public extension
Description
A simple CMS extension for CKAN that allows adding additional static pages and blog articles to the CKAN portal.
CKAN versions

~2.9.0, ~2.10.0

Show details
Download-Url (zip)
Download-Url commit date
2025-04-15
Url to repo
Category
Content Management


Background Infos

Description (long)
Show details

ckanext-pages

This extension gives you an easy way to add simple pages to CKAN.

By default you can add pages to the main CKAN menu.

Tested on CKAN 2.9 and 2.10.

Note: For CKAN 2.7 and 2.8 use v0.3.7 or older versions.

Installation

Use pip to install this plugin. This example installs it in /home/www-data/pyenv, assuming you have setup a virtualenv there:

source /home/www-data/pyenv/bin/activate
pip install -e 'git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages'

Make sure to add pages to ckan.plugins in your config file:

ckan.plugins = pages

Database initialization

You need to initialize database from command line with the following commands:

ON CKAN >= 2.9:

(pyenv) $ ckan --config=/etc/ckan/default/ckan.ini db upgrade -p pages

Configuration

Extra config options allow you to control the creation of extra pages against groups and organizations.

To switch on this behaviour, to your config add:

ckanext.pages.organization = True
ckanext.pages.group = True

These options are False by default.

This module also gives you a quick way to remove default elements from the CKAN menu and you may need todo this in order for you to have space for the new items you add. These options are:

ckanext.pages.about_menu = False
ckanext.pages.group_menu = False
ckanext.pages.organization_menu = False

By default these are all set to True, like on a default install.

To enable HTML output for the pages (along with Markdown), add the following to your config:

ckanext.pages.allow_html = True

By default this option is set to False. Note that this feature is only available for CKAN >= 2.3. For older versions of CKAN, this option has no effect. Use this option with care and only allow this if you trust the input of your users.

If you want to use the WYSIWYG editor instead of Markdown:

ckanext.pages.editor = medium

or

ckanext.pages.editor = ckeditor

This enables either the medium or ckeditor

ckanext.pages.revisions_limit = 3

By default the value is set to 3 revisions to be stored. While adding this option with a higher number, the amount of stored revisions will be increased.

ckanext.pages.revisions_force_limit = true

By default is set to False. Needed when the ckanext.pages.revisions_limit number is decreased from the original (e.g. from 5 to 2) and we want to make sure that all Pages after update will have only specified number of Revisions instead of the old setting number.

Extending ckanext-pages schema

This extension defines an IPagesSchema interface that allows other extensions to update the pages schema and add custom fields.

Dependencies

• lxml (optional, only used for injecting resource views into pages)

License

Released under the GNU Affero General Public License (AGPL) v3.0. See the file LICENSE for details.

Version
0.5.2
Version release date
2023-06-07
Contact name
David Raznick
Contakt email
Contact Url
(not set)


Installation Guide

Configuration hints

After installation, the database must be initialized with ckan –config=/etc/ckan/default/ckan.ini db upgrade -p pages. Add pages to ckan.plugins.

Plugins to configure (ckan.ini)
pages
CKAN Settings (ckan.ini)
# Enables pages for organizations (default: False) # ckanext.pages.organization = True # Enables pages for groups (default: False) # ckanext.pages.group = True # Show/hide About menu (default: True) # ckanext.pages.about_menu = False # Show/hide Groups menu (default: True) # ckanext.pages.group_menu = False # Show/hide Organizations menu (default: True) # ckanext.pages.organization_menu = False # Enables HTML output (default: False) # ckanext.pages.allow_html = True # WYSIWYG editor selection (medium or ckeditor) # ckanext.pages.editor = ckeditor # Number of stored revisions (default: 3) # ckanext.pages.revisions_limit = 5 # Enforce revision limit (default: False) # ckanext.pages.revisions_force_limit = True
DB migration to be executed
-p pages
<< back to Extensions