Extension Facet Collapse


Extension Basics

Title
Facet Collapse
Name
ckanext-facetcollapse
Type
Public extension
Description
Makes search facets collapsible on dataset and organization pages. Provides multiple default states and administrator configuration options.
CKAN versions

~2.10,~2.11

Show details
Download-Url (zip)
Last commit
7 months ago (2025-07-29 17:15:18)
Url to repo
Category
Content Management


Background Infos

Description (long)
Show details

Facet Collapse Extension

This extension makes the search facets collapsible. This includes facets for the dataset and organization pages.

Requirements

  • JQuery and Bootstrap (included by default in CKAN)
  • CKAN 2.10 or 2.11

Features

  • Collapsible facets on search pages
  • Four available default states:
    • collapse - Collapse all (default)
    • expand-first - Collapse all but first
    • expand-navs - Collapse empty
    • expand-all - Collapse none
  • Administrator interface configuration
  • CSS classes for custom styling:
    • expanded
    • collapsed
    • nothing-to-reveal (when no facets match the search)

Installation

git clone https://github.com/okfn/ckanext-facetcollapse.git
cd ckanext-facetcollapse
python setup.py develop

Configuration

ckan.plugins = facetcollapse

# Set default state for facets
ckanext.facetcollpase.default = collapse  # Options: collapse, expand-first, expand-navs, expand-all

Settings can also be modified via the CKAN Administrator Interface under Customizing Look and Feel.

Note

Developed by Open Knowledge Foundation. Actively maintained with support for CKAN 2.10 and 2.11.

Version
0.1.3
Version release date
2025-06-27
Contact name
Open Knowledge Foundation
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

Add ‘facetcollapse’ to ckan.plugins. Configure ckanext.facetcollpase.default for default facet state (collapse, expand-first, expand-navs, expand-all). Settings also available in Admin UI.

Plugins to configure (ckan.ini)
facetcollapse
CKAN Settings (ckan.ini)
ckanext.facetcollpase.default = collapse  # Options: collapse, expand-first, expand-navs, expand-all
DB migration to be executed
(not set)
<< back to Extensions