Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294288

Module provided templates can only render with Twig

$
0
0

Problem/Motivation

In \Drupal\Core\Theme\ThemeManager::render there is a condition that prevents module-originated templates from being processed with a different render_template

if (isset($theme_engine)) {
      if ($info['type'] != 'module') { // <<<< THIS CONDITION
        if (function_exists($theme_engine . '_render_template')) {
          $render_function = $theme_engine . '_render_template';
        }
        $extension_function = $theme_engine . '_extension';
        if (function_exists($extension_function)) {
          $extension = $extension_function();
        }
      }
    }

This interferes with Experience Builder's templates being able to render with a different theme engine. There's a workaround RN, but it's clunky and any additional module hoping to do this would also need to add it.

Based on looking at the commit history and talking to some long time core contributors, there's a good chance this is just an artifact from drupal <=7 and not something essential. Lets find out!

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 294288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>