Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

JSON-LD Schema UI

95 sites Security covered
View on drupal.org

This module allows you to configure JSON-LD schema types for different content types. You can enable specific schema properties, set default values, and even configure nested properties. It also provides a field for per-entity schema configuration, which generates a JSON-LD snippet that is added to the page head.

Usage

Bundle configuration

This module adds a schema configuration (vertical) tab to bundle configuration forms, for example at /admin/structure/types/manage/article or /admin/structure/block/block-content/manage/basic, which allows one or more schema types to be configured for entities of that bundle. For each bundle the set of properties that should be enabled can be selected and default values can be set for them. If the Token module is available, a token browser will be displayed to assist in the usage of entity-specific tokens for these default values. (Note that tokens will be replaced regardless of whether the Token module is installed or not.)

For schema properties that reference other schema types the (nested) properties of the referenced type can be enabled and configured just like any top-level properties. For example, for the Movie schema type, the actor property is a reference to the Person schema type, so that the name or, for example, the birthdate property of an actor associated with a movie can be specified along with other metadata about a movie.

In addition to the configuration in context of a specific bundle, the configurations for all bundles can be managed at Administration > Configuration > Search and metadata > Content Schema Settings (/admin/config/search/schemaorg/settings).

Entity configuration

For each bundle with one or more schema settings a field will be created to hold the per-entity schema configuration values.

The field comes with a widget that allows selecting one of the configured schema types and subsequently allows configuring the enabled schema properties. The fields for the properties will be prefilled with the respective default values that were configured for that schema type configuration.

The field provides a computed property which contains the token-replaced JSON-LD snippet. When the entity is rendered, a formatter will take that snippet and add it to the page head. This makes the it completely independent of the themed output of any particular entity.

Installation

Install this module like any other Drupal module. Because this module uses both the Ajax and the JavaScript states API in forms, the patch from the Drupal.org issue Display Bug when using #states (Forms API) with Ajax Request is required for the form to behave correctly.

Configuration

The module provides some basic configuration which can be managed at Administration > Configuration > Search and metadata > Content Schema Settings > Settings (/admin/config/search/schemaorg/settings). The default settings for the schema should be fine for most websites.

Note that the settings are currently not properly validated, so changing them can break the functionality of the module.

If the Select2 module is installed, you can optionally enable a Select2-based schema type configuration instead of the default hierarchical Ajax-based one.

Dependencies

This module depends on Entity API module, therefore it must be installed beforehand.

Activity

Total releases
3
First release
Feb 2025
Latest release
5 months ago
Releases (12 mo)
1 ▼ from 2
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.0.6 Stable Jan 19, 2026
1.0.5 Stable Mar 7, 2025
1.0.4 Stable Feb 24, 2025