Custom hook theme without fields produces warning

Created on 18 October 2023, about 1 year ago
Updated 19 October 2023, about 1 year ago

If there a way to create custom hook themes without any fields?

t_table_of_content:
  use: '@component/t-table-of-content/t-table-of-content.html.twig'
  label: Template / Table of content
  hook theme: 't_table_of_content'

This will throws:

Warning: Undefined array key "render element" in Drupal\Core\Theme\ThemeManager->render() (line 200 of core/lib/Drupal/Core/Theme/ThemeManager.php).
Drupal\Core\Theme\ThemeManager->render('t_table_of_content', Array) (Line: 433)
💬 Support request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇳🇮Nicaragua edysmp Nicaragua

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024