Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

DCR Renderer

7 sites No security coverage Drupal 11 · not 10
View on drupal.org

This module allows you to fetch and display content from Drupal Content Repository URLs or local files within Drupal. It includes a Twig function and a Single Directory Component (SDC) for embedding content, with options for processing, asset handling, security, and caching.

The DCR Renderer module provides a Twig extension and Single Directory Component (SDC) for fetching and rendering content from Drupal Content Repository URLs or local file paths. It has multiple processing options for proxying urls and assets.

It works hand in hand with the Drupal Content Repository module which makes URLs available for Drupal Entity which can be used to embed the entity in a Single Directory Component (SDC). The Drupal Content Repository it draws from can be on a remote Drupal server or on the same server.

Features

  • Twig Extension: dcr_get_contents() function for fetching and processing remote/local content
  • SDC Component: dcr-render component for embedding content with fallback options
  • Multiple Processing Types: Raw, proxied, hardened, and full processing options
  • Asset Extraction: Automatically handles CSS and JavaScript from fetched content
  • Security Controls: Domain restrictions, file extension filtering, and content sanitization
  • Caching: Configurable caching for improved performance
  • Error Handling: Graceful fallbacks when content cannot be fetched

Post-Installation

You install the module and you can then use its built in SDC Component
DCR Renderer in Drupal Canvas or a twig template in order to see it.

Usage

In Drupal Canvas

  1. Click Edit if you are not in the Canvas Editor
  2. Click the + Look in the left column under DCR Renderer.
  3. Drag the DCR Renderer component onto your page.
  4. In the Properties editor on the right.
  5. Set the Content URL to the Drupal Content Repository URL or other URL.
  6. Set the Processing Type property if there are issues like broken links or invisible images.
  7. You should see the referenced content in the Drupal Canvas.

In a Twig Template

{# Basic usage - fetches and processes with default 'hardened' mode #} {{ dcr_get_contents('https://example.com/repository/node/123') }}

{# With specific processing type #}
{{ dcr_get_contents('https://example.com/repository/node/123', 'proxied') }}

{# Local file #}
{{ dcr_get_contents('public://dcr-content/page.html', 'hardened') }}

The Drupal Content Repository module makes any Drupal Entity available with a URL or path and able to be embedded in a Single Directory Component (SDC). The Drupal Content Repository it draws from can be on a remote Drupal server or on the same server.

Related projects

The Static Content Type module makes static, React, Angular or Vue content embeddable in Single Directory Components (SDC) or Paragraphs, Nodes or Blocks. While the DCR Renderer is for Live Content From Drupal or elsewhere.

Depends on

Dependencies of the latest stable release

  • block Drupal core
  • node Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Aug 2025
Latest release
10 months ago
Releases (12 mo)
1
Maintenance
Slowing

Releases

Version Type Core Release date
1.0.0 Stable 11 Oct 18, 2025
1.0.0-beta1 Pre-release 11 Aug 17, 2025