Definition template value as path to Twig template

Created on 18 September 2024, 5 months ago

Problem/Motivation

What about allow template as path to a Twig template?

Currently we require a Twig compatible string, we could as well allow a path in the same key or allow template_path key.

Advantages

  • Easier creation of the template as currently we don't provide a place to test the template
  • Support for editor color syntax and parser or linter tools

Disadvantages

  • Can not go through Drupal templates management as it require a hook_theme
  • We must load the file as string to generate the inline_template, so this can create confusion with Drupal templates management
Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇫🇷France mogtofu33

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

Comments & Activities

  • Issue created by @mogtofu33
  • 🇫🇷France pdureau Paris

    Can not go through Drupal templates management as it require a hook_theme

    Not necessary. We can load the template file ourself and feed inline_template render element with the content of the loaded file.

    Let's try to avoid hook_theme and the ThemeManager as much as possible, because it represents the "old school" Drupal theming we are trying to replace with UI suite philosophy

  • 🇫🇷France pdureau Paris

    I don't have strong opinion about this subject. I like the current status quo, and I would be happy staying like that.

    However, I also agree with the 2 advantages you are mentioning.

  • Status changed to Closed: won't fix about 1 month ago
Production build 0.71.5 2024