Extension Drupal Menu Sync


Extension Basics

Title
Drupal Menu Sync
Name
ckanext-drupal_menu_sync
Type
Public extension
Description
Synchronizes CKAN navigation menus with Drupal site menus for unified navigation across platforms
CKAN versions

~2.9, ~2.10, ~2.11

Show details
Download-Url (zip)
Download-Url commit date
2025-10-10
Url to repo
Category
Specialized Tools


Background Infos

Description (long)
Show details

Extension that synchronizes CKAN’s navigation menus with Drupal site menus to provide a unified navigation experience across both platforms. Requires installation of a custom Drupal module (menu_export) on the Drupal site to export menu data. CKAN fetches menu structure from the Drupal instance and displays it in CKAN’s navigation. Useful for organizations running both CKAN and Drupal who want consistent navigation across both systems. Allows CKAN to integrate seamlessly into a broader Drupal-based website ecosystem.

Version
0.0.1
Version release date
2025-10-10
Contact name
Motornyuk Sergey
Contakt email
Contact Url
(not set)


Installation Guide

Configuration hints

Requirements: - CKAN 2.3+ - Drupal site with menu_export module installed - Python 2.6 or 2.7

Drupal Setup: 1. Install custom menu_export module on Drupal site: - Module files located in drupal_custom_module_menu_export directory - Copy module to Drupal’s modules directory - Enable module in Drupal admin interface

  1. Configure menu_export module:
    • Module provides JSON endpoint exposing Drupal menu structure
    • Default endpoint: {drupal_site}/menu-export

CKAN Installation:

  1. Activate CKAN virtualenv: . /usr/lib/ckan/default/bin/activate

  2. Install extension for development: git clone git@git.links.com.au:smotornyuk/ckanext-drupal_menu_sync.git cd ckanext-drupal_menu_sync python setup.py develop

    Or install from GitHub: pip install -e git+https://github.com/DataShades/ckanext-drupal_menu_sync#egg=ckanext-drupal_menu_sync

  3. Add plugin to ckan.plugins in production.ini: ckan.plugins = … drupal_menu_sync …

  4. Configure Drupal site URL in production.ini: drupal.site_url = https://your-drupal-site.com

    If not specified, defaults to CKAN instance root URL.

  5. Restart CKAN: sudo service apache2 restart

Configuration Options:

URL of Drupal instance (defaults to CKAN root if not specified)

drupal.site_url = https://your-drupal-site.com

Usage:

Automatic Menu Sync: - Once configured, CKAN automatically fetches menu structure from Drupal - Drupal menu items appear in CKAN navigation - Menu updates in Drupal automatically reflected in CKAN - No manual synchronization required

Menu Export Endpoint: - Drupal menu_export module provides JSON endpoint - Endpoint returns menu structure in JSON format - CKAN fetches and parses menu data - Menu items inserted into CKAN navigation templates

Drupal Module (menu_export):

The custom menu_export module must be installed on Drupal:

Location: - Files included in drupal_custom_module_menu_export directory - Standard Drupal module structure

Installation: 1. Copy menu_export directory to Drupal’s sites/all/modules/ or modules/ directory 2. Enable module in Drupal admin: Admin → Modules → menu_export 3. Clear Drupal cache

Functionality: - Exposes Drupal menus as JSON - Provides endpoint for CKAN to consume - Configurable which menus to export - Supports nested menu structures

Testing:

  1. Run tests: nosetests –nologcapture –with-pylons=test.ini

  2. Run tests with coverage: pip install coverage nosetests –nologcapture –with-pylons=test.ini –with-coverage –cover-package=ckanext.drupal_menu_sync –cover-inclusive –cover-erase –cover-tests

Troubleshooting:

  1. Menus not syncing:

    • Verify drupal.site_url is correct in CKAN config
    • Check menu_export module is enabled in Drupal
    • Test Drupal menu export endpoint directly: {drupal_site}/menu-export
    • Check CKAN logs for connection errors
  2. Menu items not displaying:

    • Verify Drupal menus are published
    • Check menu permissions in Drupal
    • Clear both CKAN and Drupal caches
    • Verify menu structure is valid JSON
  3. Connection errors:

    • Verify CKAN server can reach Drupal site
    • Check firewall rules
    • Verify SSL certificates if using HTTPS
    • Test connectivity: curl {drupal_site}/menu-export

Development Status: Beta (4)

License: AGPL v3.0 or later

Keywords: CKAN, Drupal, menu, navigation, integration

Developer: Link Digital (Sergey Motornyuk)

Use Case: - Organizations running both CKAN and Drupal - Need consistent navigation across platforms - Drupal as main portal, CKAN as data catalog - Seamless user experience between systems

Plugins to configure (ckan.ini)
# drupal_menu_sync=ckanext.drupal_menu_sync.plugin:Drupal_Menu_SyncPlugin
CKAN Settings (ckan.ini)
# drupal.site_url = https://your-drupal-site.com
DB migration to be executed
(not set)
<< back to Extensions