WP Manifestindependent plugin directory
manifest / editor / modularity-navigation-card

Modularity Navigation Card

A Modularity module for parent pages and their child pages.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/consid-webbteamet/modularity-navigation-card/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Standalone Modularity module for rendering parent pages together with their child pages as navigation cards in Municipio.

Purpose

  • Render selected parent pages as cards.
  • Show up to three child pages directly in each card.
  • Show remaining child pages behind a toggle.
  • Support both classic Modularity modules and Gutenberg block rendering.

Plugin structure

  • Bootstrap: modularity-navigation-card.php
  • App class: source/php/App.php
  • Module class: source/php/Module/NavigationCard.php
  • View: source/php/Module/views/navigation-card.blade.php
  • ACF PHP export: source/php/AcfFields/php/navigation-card-settings.php
  • ACF JSON export: source/php/AcfFields/json/navigation-card-settings.json

Behavior

Each card contains:

  • A parent page link
  • Up to three visible child links
  • An expandable section for remaining child links

The module normalizes card data in PHP and renders the markup through Blade. Toggle labels are generated from the total number of child pages.

Gutenberg compatibility

The module supports block rendering through the Modularity/Block/acf/navigation-card/Data filter in source/php/App.php.

This is used to normalize raw block data before rendering so the module behaves consistently in block mode and regular Modularity mode.

ACF setup

The plugin uses AcfExportManager when available and falls back to the PHP export when needed.

Field group:

  • Slug: navigation-card-settings
  • Key: group_modularity_navigation_card_settings

Development notes

  • PHP 8+ is required.
  • The plugin is intended to be installed as a standalone Composer-managed WordPress plugin.
  • Project-specific frontend behavior and styling should live outside this repository when a project needs local customization without changing the shared module.
  • In municipio-deployment, navigation card CSS and JS are owned by packages/lidingo-customisation/.

Typical change flow

  1. Update module PHP, Blade view, or ACF definition in this plugin.
  2. Validate the module in WordPress and Gutenberg.
  3. Commit and push the plugin change.
  4. Update the package version or reference in the consuming deployment repository.