Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

A Drupal module that provides a template system for creating pages with pre-configured layouts and content using Mercury Editor.

Overview

Streamlines page creation by providing pre-defined templates that integrate with Mercury Editor. Content creators can select templates when creating new pages, ensuring consistency and reducing setup time.

Features

  • Template Management: Create, edit, and delete page templates via admin interface
  • Content Type Integration: Configure templates for specific content types
  • YAML Configuration: Define templates using YAML for easy editing
  • Flexible Field Support: Support for any field machine name
  • Region Support: Layout regions for content placement
  • Mercury Editor Integration: Seamless integration with Mercury Editor

Requirements

  • Drupal 10.x or 11.x
  • layout_paragraphs: ^2.1
  • mercury_editor: ^2.0,
  • paragraphs: ^1.15,
  • php: >=8.1

Installation

composer require drupal/mercury_editor_page_templates
drush en mercury_editor_page_templates

Quick Start

  1. Configure Mercury Editor: Set up content types in Mercury Editor settings
  2. Create Templates: Go to Configuration > Content authoring > Mercury Editor Page Templates
  3. Use Templates: When creating content, select from available templates

YAML Template Example

-
  type: custom_section
  description: 'Main Content Section'
  layout: two_column_75_25
  paragraphs:
    -
      type: content_block
      description: 'Content block with title and body in the first region'
      field_config:
        -
          field_name: field_title
          field_structure:
            value: 'Welcome to Our Site'
        -
          field_name: field_body
          field_structure:
            value: 'This is the main content that appears in the first region with detailed information about our services and offerings.'
            format: full_html
      style_options:
        background_color: 'Light Blue'
        text_alignment: 'Left'
        padding_size: 'Medium'
      region: first
    -
      type: text_block
      description: 'Simple text block in the second region'
      field_config:
        -
          field_name: body
          field_structure:
            value: 'This is sidebar content that appears in the second region.'
            format: full_html
      style_options:
        background_color: 'bg-light border-2'
        text_alignment: 'text-center font-bold'
        border_style: 'border-solid border-gray-300'
      region: second

Troubleshooting

Templates not showing?

  • Ensure content type is configured in Mercury Editor
  • Check template is assigned to correct content type
  • Validate YAML syntax

YAML errors?

  • Use 2-space indentation
  • Check for missing colons after field names
  • Validate with online YAML validator

Activity

Total releases
9
First release
Sep 2025
Latest release
2 weeks ago
Release cadence
25 days
Stability
89% stable

Release Timeline

Releases

Version Type Release date
1.0.7 Stable Mar 31, 2026
1.0.6 Stable Mar 27, 2026
1.0.5 Stable Mar 23, 2026
1.0.4 Stable Mar 23, 2026
1.0.3 Stable Mar 23, 2026
1.0.2 Stable Mar 23, 2026
1.0.1 Stable Mar 20, 2026
1.0.0 Stable Mar 19, 2026
1.0.x-dev Dev Sep 12, 2025