---
url: 'https://dxpr.com/hc/documentation/learn-dxpr-builder/customization/custom-templates'
title: 'Override DXPR Builder templates | DXPR'
author:
  name: docs-sync
  url: 'https://dxpr.com/users/docs-sync'
date: '2026-10-23T14:31:17+00:00'
copyright: 'Copyright DXPR. All rights reserved.'
type: article
summary: 'The four Twig templates you can override, why element markup cannot be overridden, and what to use instead'
tags:
  - 'Match your brand'
image: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
published: true
og:
  site_name: DXPR
  updated_time: '2026-10-23T14:31:17+0000'
  'image:alt': 'DXPR, powered by Drupal: AI-powered Drupal for marketers.'
schema:
  '@context': 'https://schema.org'
  '@graph':
    -
      mainEntity: {  }
    -
      '@type': TechArticle
      headline: 'Override DXPR Builder templates'
      description: 'The four Twig templates you can override, why element markup cannot be overridden, and what to use instead'
      image:
        '@type': ImageObject
        url: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
        width: '1200'
        height: '630'
      datePublished: '2026-10-23T14:31:17+0000'
      dateModified: '2026-10-23T14:31:17+0000'
      author:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
        url: 'https://dxpr.com/'
        logo:
          '@type': ImageObject
          url: 'https://dxpr.com/themes/custom/dxpr_com/dxpr-logo-dark.svg'
          width: '1348'
          height: '501'
      publisher:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
        url: 'https://dxpr.com/'
        logo:
          '@type': ImageObject
          url: 'https://dxpr.com/themes/custom/dxpr_com/dxpr-logo-dark.svg'
          width: '1348'
          height: '501'
      mainEntityOfPage: 'https://dxpr.com/hc/documentation/learn-dxpr-builder/customization/custom-templates'
      articleSection: 'Match your brand'
    -
      '@type': WebPage
      '@id': 'https://dxpr.com/hc/documentation/learn-dxpr-builder/customization/custom-templates'
      description: 'The four Twig templates you can override, why element markup cannot be overridden, and what to use instead'
      breadcrumb:
        '@type': BreadcrumbList
        itemListElement:
          -
            '@type': ListItem
            position: 1
            name: Home
            item: 'https://dxpr.com/'
      publisher:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
      inLanguage: en
---
[Help Center](/hc)/[Documentation](/hc/documentation) /[Learn DXPR Builder](/hc/documentation/learn-dxpr-builder) /[Manage the site](/hc/documentation/learn-dxpr-builder/manage) /[Match your brand](/hc/documentation/learn-dxpr-builder/customization) # Override DXPR Builder templates.

The four Twig templates you can override, why element markup cannot be overridden, and what to use instead

 Learn DXPR BuilderManage the siteMatch your brand

   ## In this guide

 Related guides

- [Page templates](/hc/documentation/learn-dxpr-builder/reusable-templates/page-templates)
- [Theming](/hc/documentation/learn-dxpr-builder/development/theming)

DXPR Builder renders its elements in the browser, from templates compiled into the editor. There is no element template you can copy into a theme. The module does ship four Twig templates for its own pages, and you override those the normal Drupal way. This page lists them, explains why element markup cannot be overridden, and points to the routes the module supports instead.

## Twig templates you can override

The templates live in the module's `templates/` folder:

| Template | Used for | Variables |
|---|---|---|
| `dxpr-license-info.html.twig` | The usage summary on the **User Licenses** and **Content items** pages, and the **License info** block | `used_count`, `total_count`, `limit`, `block_label`, `total_label`, `used_label`, `more_info_link` |
| `page--dxpr-builder--media-library.html.twig` | The page wrapper of the Media Library dialog at `/dxpr_builder/media-library` | the standard `page` variables |
| `html--dxpr-builder--media-library.html.twig` | The `<html>` wrapper of the same dialog | the standard `html` variables |
| `page--people-list.html.twig` | A starting point for the **People** page (`/admin/people`) with a licence summary | the standard `page` variables plus `user_license` |

The first three work as they are. Drupal does not load `page--people-list.html.twig` from the module. DXPR Builder only adds the `page__people_list` suggestion and the `user_license` variable on the People page. To show the summary there, copy the file into your admin theme.

To override a template:

1. Copy the file from `modules/contrib/dxpr_builder/templates/` into the `templates/` folder of the theme that renders it. The admin pages and the Media Library dialog use the admin theme. The **License info** block uses the theme of the region you placed it in.
2. Edit the copy.
3. Clear caches with `drush cr`.

## Why element markup cannot be overridden

Each element's markup is a twig.js template in `dxpr_builder/templates/`, for example `elements/alert/alert.twig.html`. The build compiles these templates into `dxpr_builder/dxpr_templates.js`. The editor renders them in the browser and saves the resulting HTML into the field. Two things follow:

- A changed template needs a rebuild of the editor. Sites that load the editor from the DXPR CDN cannot use a changed template at all.
- Saved pages keep the HTML they were saved with. A new template only affects elements rendered after the change.

So the module offers no per-site override of element templates. Use one of the routes below.

## Supported customisation routes

| Goal | Route |
|---|---|
| Reusable layouts for editors | [Page templates](/hc/documentation/learn-dxpr-builder/reusable-templates/page-templates) and [User templates](/hc/documentation/learn-dxpr-builder/reusable-templates/user-templates), both chosen in the builder |
| Change how elements look | [Custom CSS](/hc/documentation/learn-dxpr-builder/customization/custom-css) in the theme, aimed at your own classes or the `az-*` classes |
| Give editors named styles | [Utility classes](/hc/documentation/learn-dxpr-builder/customization/utility-classes) from the theme's `.info.yml`, and [custom styles](/hc/documentation/learn-dxpr-builder/customization/text-editor#set-up) for the text editor |
| Extra icon sets | [Icon libraries](/hc/documentation/learn-dxpr-builder/customization/icon-libraries) |
| New element types | [Creating custom elements](/hc/documentation/learn-dxpr-builder/development/custom-elements) |

## What's next?

- [Page templates](/hc/documentation/learn-dxpr-builder/reusable-templates/page-templates): the template system editors use.
- [Theming DXPR Builder](/hc/documentation/learn-dxpr-builder/development/theming): how the builder's CSS and your theme fit together.