Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Structured Data Markup (sdm)
========
Provides an entity for adding Structured Data Markup (SDM) JSON/LD script objects to your site. You can create fieldable sdm object types to add whatever custom JSON/LD objects you like, and use context module to determine what sdm objects are rendered (in the page ) and when.
A feature module is provided as both an example and an implementation of the popular google social profiles via JSON/LD.
Alternative Modules
=========
- https://www.drupal.org/project/structured_data - provides a way to add site name and logo as sdm output. In contrast this module allows any sdm object according to the JSON/LD specification.
- https://www.drupal.org/project/jsonld - provides a way to output entities as JSON/LD objects via REST web services. In contrast this module outputs via
tags in the HTML markup.
- Download and install in the usual way.
- Make sure that your admin user(s) have the Administer Structured Data Markup (administer_sdm_data) permission.
- Navigate to /admin/structure/sdm/types to add a sdm object type(s).
- Manage the sdm type as you would any other entity by adding a description, adding fields etc. NOTE that the display management screen is not used so you can ignore that. NOTE: This module only supports text and textarea field types, but you can add whatever JSON/LD values you like with one of these. No other fields are needed!
- Navigate to /admin/structure/sdm and add an sdm object(s) of your new type(s).
- Navigate to /admin/structure/context and add a context (or modify an existing one). Add an sdm reaction and select one or more sdm objects that you have created. The JSON/LD object will be included in the of the pages on which the context is active.
- Install the google_social_profile_sdm module as usual.
- Navigate to /admin/structure/sdm and add one or more sdm objects of type Google Social Profile (google_social_profile). See https://developers.google.com/structured-data/customize/social-profiles for more information on this JSON/LD implementation.
- Navigate to /admin/structure/context and create/add to a context and specify on which pages the sdm object will appear.
Project information
- Module categories: Content Editing Experience, Content Display, Developer Tools
- 11 sites report using this module
- Created by tbenice on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.