Add functionality and customize your Drupal application with thousands of projects contributed by our amazing community.
Theme engines are how themes interact with Drupal. Use the default theme engine included with Drupal core unless you are using a theme that specifically requires a different theme engine.
Are you interested in creating your Drupal site's front-end (theme) entirely with modern JavaScript code instead of Twig and PHP, but you simultaneously want it to be a traditional (not Decoupled) Drupal site where your site builders and content editors can use Block UI, Layout Builder, Views, Display Suite, Paragraphs, Webform, and all of the other Drupal modules they're used to using, for configuring what Drupal renders where and how? If so, then hopefully some day this theme engine will be for you!
The drupal 7 implementation of TWIG template system.
Documentation for this project is available at to tfd7.rocks, and a base theme is available at Soid sandbox
Oxide
Adds haml-support to Drupal and its twig-engine.
The drupal 7 version is inspired on original work of Kyle Cunningham: Peroxide project and on original work of Antoine Lafontaines oxide project
The drupal 8 version is completely rewritten and uses dependency-injection to register the haml parser with the twig-engine.
Fenom is a lightweight, fast, flexible template engine, which can be a good substitute for Twig or Smarty. It parses templates via Tokenizer extension of PHP.
With Drupal8 a new breed of decoupled architecture is on with multiple different perspectives and views and I am working on a project which requires handlebars as template engine rather Twig as default one.
I have created a theme engine on which I am still working, that basically replaces the Twig partially for moment and renders everything from .hbss templates.
Here is a road-map of this theme engine.
Support status
This is an experimental theme engine with problematic security. Don't use it unless you know what you are doing and are prepared to implement your own text sanitization. For Drupal 8 sites, you should generally use Twig instead.
The XSL Engine supports XSLT processing for drupal templates. Now you can leverage the power of XPATH/XSLT for traversing your data. Quickly and elegantly format your semantic data structures into custom HTML markup in no time.
Haml theme engine for Drupal.
Requires you to download phpHaml, extract to the themes/haml
folder and presto. Don't forget to use *.haml on your template filenames.
I have taken over this project and am looking for helpers.
ETS, or Easy Template System, is a very clean template system that enables you to transform a set of data to any type of document.
Sample Themes
Awesomengine is the most awesome engine. It allows for embedding of PHP code, not only in html templates, but in css files, allowing for dynamically set CSS. Otherwise, it is nearly entirely identical to the phptemplate theme engine.
The Zengine theme engine is a CSS-oriented theme engine based entirely on PHPTemplate.
It is the continuation of the Zen theme project. Zen was designed to be a great starting theme, but this presented a problem because users who have already created their themes were unable to benefit from further development of the underlying Zen framework. Zengine attempts to solve the same issues as Zen in a more robust way which allows improvements to the underlying framework even for those who have already created their themes.
The XTemplate theme system uses templates to layout and style Web pages. It separates logic (PHP), structure (XHTML/HTML), and style (CSS), making it easy for designers to create or modify templates by working on XHTML/HTML and CSS without having to worry about any PHP coding.
This engine is compatible with both PHP 4 and 5 and is designed to be used with Drupal 4.7. I have no plans to update this module for 5.0. If someone would like to contribute a patch I'll be happy to review and commit it.
Announce by phprf on 2/02/15:
As of Drupal 8, PHPTAL will not be needed. Twig does everything that PHPTAL did and more.
Announce by phprf on 2/21/12:
D7 release is now up!
Manifest by phprf:
Welcome to the best template engine on drupal.org! Ok...well, best in my opinion! Take a look below to see what I mean.
You'll need an installation of PHPTAL as a PEAR module or the latest zip file (http://phptal.org/download.html).
You can get the pear module by saying
pear install http://phptal.org/latest.tar.gz
and upgrade by saying
pear upgrade http://phptal.org/latest.tar.gz
on the command line.
This theme engine is no longer supported
Since Drupal 5, and even more so in Drupal 6 and beyond, the 'other' smarty theme engine (http://drupal.org/project/smarty) works much better. So there is no longer a need for wgSmarty, which is a good thing as it did confuse people anyway.
wgSmarty is an implementation of the Smarty template engine as a theme engine.
Advantages
- Template files are easier to create and maintain then with PHPtemplate
- Templates are compiled into PHP to avoid speed and memory issues with search-and-replace template engines like XTemplate
- wgSmarty is much more closely integrated with Drupal than the existing smarty theme engine
Disadvantages
- wgSmarty is currently experimental and is only available in CVS
- There is very little support for wgSmarty: even when it is released, it will still be poorly supported in comparison with PHPTemplate
Download wgSmarty
A theme engine that allows you to use template files written using Smarty Template Engine syntax.
The 'default' template for this engine is box_grey_smarty, which is ported from the original box_grey theme.
Installation
Because of a drupal-contrib policy, a smarty installation is not currently included in default release tarballs. You can obtain a tarball already including Smarty in the libs directory here (4.6.x) or here (4.7.x).
Please see installation instructions for installation details.
Details
Directories 'configs' and 'plugins' are parsed for files if they exist in the theme directory as well as if they are in the main engine directory.
Overriding other theme functions is accomplished in a manner similar to that described for PHPTemplate.
Playing with twig. This is Drupal independent for now.
Twig is a modern template engine for PHP.