Extension Resourcesfilter


Extension Basics

Title
Resourcesfilter
Name
ckanext-resourcesfilter
Type
Public extension
Description
Interactive paginated resources list for the CKAN dataset page
CKAN versions
Download-Url (zip)
Last commit
3 years ago (2022-05-31 09:13:56)
Url to repo
Category
Data Management & Quality


Background Infos

Description (long)
Show details

ckanext-resourcesfilter

This extension replaces the standard resources list on the dataset page with an interactive paginated list that can be browsed and filtered, useful for datasets with many resources.

Demo

Important things to keep in mind:

  • This extension overrides CKAN core templateis. If you need to add customizations to the resources list for your own project, you need to override this extension’s templates from your own (and load your plugin first in the ini file, eg ckan.plugins = ... your_plugin resourcesfilter). The templates to override are the following:

    • package/snippets/resources_list.html -> same name and location
    • package/snippets/resource_item.html -> package/snippets/resources_list_template.html The second one is a Mustache template, rendered on the client. So any server side logic (eg check if user can edit, build URLs, etc) must be done on the Jinja2 resources_list.html template and passed via module parameters.
  • The browsable list is only rendered on the dataset read page, not the internal management one.

  • The current implementation does not support translations or the “popular” indicators. Pull requests are welcome.

Installation

To install ckanext-resourcesfilter:

  1. Activate your CKAN virtual environment, for example::

    . /usr/lib/ckan/default/bin/activate

  2. Install the ckanext-resourcesfilter Python package into your virtual environment::

    pip install ckanext-resourcesfilter

  3. Add resourcesfilter to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/production.ini).

  4. Restart CKAN.

Configuration

The page size controls the minimum number of resources in a dataset needed to display the updated interface. The default is 10.

ckanext.resourcesfilter.page_size = page_
Version
Version release date
(not set)
Contact name
(not set)
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

To install ckanext-resourcesfilter:

  1. Activate your CKAN virtual environment, for example::

    . /usr/lib/ckan/default/bin/activate

  2. Install the ckanext-resourcesfilter Python package into your virtual environment::

    pip install ckanext-resourcesfilter

  3. Add resourcesfilter to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/production.ini).

  4. Restart CKAN.

Plugins to configure (ckan.ini)
your_plugin resourcesfilter
CKAN Settings (ckan.ini)
# ckanext.resourcesfilter.page_size = page_size
DB migration to be executed
(not set)
<< back to Extensions