Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
http://makina-corpus.com/blog/metier/2015/howto-using-twig-in-drupal-7
It would be nice if we could keep some parity between the 8.x and 7.x versions. Obviously we cannot remove *.tpl.php
files in 7.x, but perhaps it would be nice to offer a solution for those whom wish to use Twig in D7?
From reading the above article, we can alter the system info from Bootstrap itself using hook_system_info_alter()
:
/**
* Implements hook_system_info_alter().
*/
function bootstrap_system_info_alter(&$info, $file, $type) {
// @todo Add support for grand-child themes.
if ($type == 'theme' && module_exists('tfd7') && ($info['name'] === 'bootstrap' || $info['base theme'] === 'bootstrap')) {
$info['engine'] = 'twig';
}
}
I'm not entirely sure that this is the only thing needed and we'll likely need to provide sub-theme support as well. Thoughts?
Comments
Comment #1
markhalliwellComment #2
markhalliwellComment #3
markhalliwellComment #4
markhalliwellThis simply isn't going to happen. There is too much overhead in maintaining it in 7.x.