PHPackages                             umd-lib/umdds\_dynamic\_components - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. umd-lib/umdds\_dynamic\_components

ActiveDrupal-module[Utility &amp; Helpers](/categories/utility)

umd-lib/umdds\_dynamic\_components
==================================

UMD Libraries Dynamic Components module providing dynamic blocks and autocomplete functionality.

1.0.0(2mo ago)012↓88.9%Apache-2.0PHPPHP &gt;=7.4

Since May 20Pushed 1mo agoCompare

[ Source](https://github.com/umd-lib/umdds-dynamic-components)[ Packagist](https://packagist.org/packages/umd-lib/umdds_dynamic_components)[ RSS](/packages/umd-lib-umdds-dynamic-components/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

UMD Libraries Dynamic Components Module
=======================================

[](#umd-libraries-dynamic-components-module)

This Drupal module provides configurable blocks that display UMD Libraries Design System components. The first configurable block is the **Person Component Block**, which displays person content using the UMD Libraries Person web component.

Features
--------

[](#features)

- **Person Component Block**: Displays Person content with autocomplete search
- **Autocomplete Search**: Search and select Person content by name
- **Field Mapping**: Automatically maps Drupal Person content fields to the Person component:
    - `title` → `person_name`
    - `field_professional_title` → `person_title`
    - `field_phone` → `person_phone`
    - `field_email` → `person_email`
    - `field_library_department` → `person_department`

Requirements
------------

[](#requirements)

- Drupal 10 or higher
- A "Person" content type with the following fields:
    - `title` (built-in)
    - `field_professional_title` (text field)
    - `field_phone` (text field)
    - `field_email` (email field)
    - `field_library_department` (text field or entity reference)

Installation
------------

[](#installation)

1. Clone or copy this module to your Drupal modules directory:

    ```
    drupal-modules/umdds_dynamic_components/
    ```
2. Install the module via Drupal UI or Drush:

    ```
    drush pm:install umdds_dynamic_components
    ```

Usage
-----

[](#usage)

### Creating a Person Block

[](#creating-a-person-block)

1. Go to **Structure &gt; Block Layout** in Drupal
2. Click "Place block" in the region where you want the block
3. Search for and select "UMD Libraries Person Component"
4. Configure the block:
    - Enter a block title (optional)
    - Use the autocomplete field to search and select a Person content item
    - The autocomplete will filter by person title as you type
5. Save the configuration

### Field Mapping

[](#field-mapping)

When a Person node is selected, the block automatically extracts and maps the following fields:

Drupal FieldComponent Propertytitleperson\_namefield\_professional\_titleperson\_titlefield\_phoneperson\_phonefield\_emailperson\_emailfield\_library\_departmentperson\_departmentEmpty fields are omitted from the component output.

API Endpoints
-------------

[](#api-endpoints)

### Autocomplete Endpoint

[](#autocomplete-endpoint)

- **Route**: `/umdds-dynamic-components/autocomplete/person`
- **Query Parameter**: `q` (search query)
- **Returns**: JSON array of matching Person content items

Example:

```
GET /umdds-dynamic-components/autocomplete/person?q=john
```

Component Integration
---------------------

[](#component-integration)

The module renders the UMD Libraries Person web component using a Twig template. The component expects:

```

```

For more information about the UMD Libraries Person component, see:

Architecture
------------

[](#architecture)

```
umdds_dynamic_components/
├── src/
│   ├── Plugin/Block/
│   │   └── PersonComponentBlock.php    # Block plugin with form configuration
│   └── Controller/
│       └── AutocompleteController.php  # Autocomplete search handler
├── templates/
│   └── umdds-person-component.html.twig  # Twig template for component rendering
├── umdds_dynamic_components.info.yml   # Module metadata
├── umdds_dynamic_components.module     # Module file with theme hooks
├── umdds_dynamic_components.routing.yml # Route definitions
└── README.md                           # This file

```

Development Notes
-----------------

[](#development-notes)

### Adding New Components

[](#adding-new-components)

To add additional configurable blocks for other UMD Libraries Design System components:

1. Create a new block plugin in `src/Plugin/Block/`
2. Add a new autocomplete controller method for searching relevant content
3. Define routing for the autocomplete endpoint
4. Create a Twig template for rendering the component
5. Register the template in `hook_theme()` in the .module file

### Caching

[](#caching)

The block implements proper caching using the `#cache` property with the selected node's cache tags. This ensures that the block is invalidated whenever the Person node is updated.

Troubleshooting
---------------

[](#troubleshooting)

### Block not showing content

[](#block-not-showing-content)

- Verify that the Person content type exists
- Check that at least one Person node is published
- Ensure the autocomplete field can find Person content

### Autocomplete not working

[](#autocomplete-not-working)

- Clear the Drupal cache
- Verify the routing file is properly formatted
- Check that the route is registered with `drush route:rebuild` or `drush cr`

### Component not rendering

[](#component-not-rendering)

- Verify the UMD Libraries Design System JavaScript is loaded on the page
- Check browser console for component errors
- Ensure all required component attributes are set

License
-------

[](#license)

This module is part of the UMD Libraries Drupal ecosystem.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance89

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

65d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4515014?v=4)[Jeremy Gottwig](/maintainers/jgottwig)[@jgottwig](https://github.com/jgottwig)

---

Top Contributors

[![jgottwig](https://avatars.githubusercontent.com/u/4515014?v=4)](https://github.com/jgottwig "jgottwig (5 commits)")

### Embed Badge

![Health badge](/badges/umd-lib-umdds-dynamic-components/health.svg)

```
[![Health](https://phpackages.com/badges/umd-lib-umdds-dynamic-components/health.svg)](https://phpackages.com/packages/umd-lib-umdds-dynamic-components)
```

###  Alternatives

[farmos/farmos

A web-based farm record keeping application.

1.3k7.1k1](/packages/farmos-farmos)[emulsify-ds/emulsify-drupal

The official Drupal theme for Emulsify, with Storybook and a Vite-based build workflow for generated child themes

96556.4k2](/packages/emulsify-ds-emulsify-drupal)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
