Render API

Drupal 8's Render API roughly consists of two parts:

  1. The render pipeline — which is format-agnostic (HTML, JSON, anything)
  2. Render arrays, which are a representation of a HTML page. They allow nesting (like HTML) and altering (necessary for Drupal's flexibility)

This guide provides comprehensive detailed information about both.

Cacheability of render arrays

Short version in the API documentation: Render API overview: Caching

Bubbleable metadata

The parent page explains cacheability in general. This looks in detail at how render arrays bubble cacheability.

Auto-placeholdering

Drupal 8's Render API automatically creates placeholders of highly dynamic parts of a page, to have the best possible cacheability.

Render arrays

"Render Arrays" or "Renderable Arrays" are the building blocks of a Drupal page.

Render elements

Render elements (including form input elements) in Drupal

The Drupal 8 render pipeline

How Drupal renders pages

Guide maintainers

wim leers's picture
amber himes matz's picture