# Themes and Associated Theme Components Report

**URL:** https://meta.discourse.org/t/themes-and-associated-theme-components-report/386372
**Category:** Data & reporting
**Tags:** sql-query
**Created:** [October 21, 2025, 9:17pm UTC](https://meta.discourse.org/t/themes-and-associated-theme-components-report/386372 "2025-10-21T21:17:32Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![SaraDev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saradev/32/335139_2.png) [@SaraDev](https://meta.discourse.org/u/SaraDev)
#### Post date: [October 21, 2025, 9:17pm UTC](https://meta.discourse.org/t/themes-and-associated-theme-components-report/386372/1 "2025-10-21T21:17:32Z")

</div>

This query provides a comprehensive view of all themes in your Discourse instance along with their installed components, and can be helpful for admins who manage multiple themes and need to quickly identify which components are installed on each theme.

```sql
-- [params]
-- null text :theme_name

-- Query to list all themes and their associated installed components
WITH parent_themes AS (
  SELECT id, name
  FROM themes
  WHERE component = false
    AND (:theme_name IS NULL OR name ILIKE '%' || :theme_name || '%')
)

SELECT 
  pt.name AS theme_name,
  ct.name AS component_name,
  ct.enabled AS component_enabled
FROM parent_themes pt
LEFT JOIN child_themes child ON child.parent_theme_id = pt.id
LEFT JOIN themes ct ON ct.id = child.child_theme_id
ORDER BY pt.name, ct.name

```

### Parameters

- **theme\_name** : (Optional) Filter results to show only themes containing this text. The default view shows all themes and their components

### Results

- **theme\_name** : The name of each theme
- **component\_name** : The name of components installed on the theme
- **component\_enabled** : Whether the component is enabled (true) or disabled (false)

Themes that have no components will appear with NULL values for component fields. Results are ordered alphabetically by theme name and then component name

### Example Results

| theme\_name | component\_name | component\_enabled |
| --- | --- | --- |
| Default | discourse-adplugin | true |
| Default | discourse-chat | true |
| Default | discourse-signatures | false |
| Corporate | discourse-header-search | true |
| Corporate | discourse-tooltips | true |

---

_[View the full topic](https://meta.discourse.org/t/themes-and-associated-theme-components-report/386372)._
