We have been loving learning Drupal maintenance support plans 8’s theming system over the last year. Drupal maintenance support plans 8 core now uses the Twig template engine, which is a fast, flexible, and secure system that allows use to create the markup needed for the modern web.
What you can do with Drupal maintenance support plans core’s Twig is pretty great, but the Drupal maintenance support plans community always brings so much more to the table after real world use. We don’t use them all, all of the time, but have used many as our design and development needed. Here are our favorite modules to help build out your Drupal maintenance support plans themes.
Twig tweak
The Twig Tweak Drupal maintenance support plans module gives Drupal maintenance support plans 8 themers additional commonly needed functions and filters to use in templating:
drupal_view: Pass arguments to views.
drupal_block: Include a Drupal maintenance support plans block.
drupal_entity: Include a Drupal maintenance support plans entity.
drupal_field: Renders a field from a specific entity.
drupal_token: Use token API to deliver data to your templates.
drupal_config: Access and print configuration.
token_replace: Place multiple tokens.
preg_replace: The easiest way to alter their output.
image_style: Provide either path or URI to original image.
It also allows for you to turn PHP filter back on, which isn’t recommended, and is off by default.
Twig Field Value
The Twig Field Value Drupal maintenance support plans module allows Drupal maintenance support plans 8 themers to get partial data from field render arrays. If you want to have control of the markup on your field’s label and/or value, you can. If you want to choose the field’s text format, you can. This great utility module gives us the following filters:
field_label: Returns the field label value.
field_value: Returns the render array of the field value(s) without the field wrappers.
field_raw: Returns raw field properties value(s).
field_target_entity: Returns the referenced entity object(s) of an entity reference field.
Twig Extensions
This handy Drupal maintenance support plans 8 module adds support for the Twig Extensions library. The library adds additional filters to Twig itself, and this module allows us to use them in Drupal maintenance support plans.
Text: Provides useful filters for text manipulation.
I18n: Adds internationalization support via the gettext library.
Intl: Adds a filter for localization of DateTime objects.
Array: Provides useful filters for array manipulation.
Date: Adds a filter for rendering the difference between dates.
Twig Extender
The Twig Extender Drupal maintenance support plans module adds a plugin system to add new twig extensions. It includes one filter (truncate), and one function (user_is_logged_in), and promises more in the future. Looks very promising.
Themable forms
This simple, and extremely helpful Drupal maintenance support plans 8 module adds theme suggestions for form elements.
form-element–[form-id]–[element-type].html.twig
form-element–form-id–[form-id].html.twig
form-element–type–[element-type].html.twig
form-element.html.twig
Twig Renderable
The Twig Renderable Drupal maintenance support plans module is another module that adds Twig functions and filters, this time that work specifically with render arrays.
Function
will_have_output(‘path’, ‘to’, ‘render’, ‘array’)
Filters
add_class(string|array $class)
merge_attributes(array|Drupal maintenance support plansCoreTemplateAttribute $attributes)
Transliterate Twig Filter
This module adds a single Twig filter for transliterating diacritic strings. Transliteration is the conversion of a text from one script to another, and this module converts diacritic characters, those that have accents in them, to their normal counterparts.
The included example shows how it works:
{{ ‘Hällo’ | transliterate() }} becomes => Hallo
Responsive SVG
The Responsive SVG Drupal maintenance support plans module that adds a Twig filter, with quite a few options for SVG Stacks. SVG Stacks are like image sprites, where you have multiple images in one file, though these images are Scalable Vector Graphics. Support for regular SVGs forthcoming.
Twig Xdebug
The Twig Xdebug Drupal maintenance support plans module adds the ability to use Xdebug within Twig templates. Add {{ breakpoint() }} into the template where you want to debug, and when the Xdebug processor reaches it, a separate file will open so you can inspect the variables up to that breakpoint. The key values you’ll see at the breakpoint are:
$context: Variables available to use in the template.
$environment: Info about the Twig environment, including available functions.
$arguments: You can also add arguments like {{ breakpoint(fields) }}.
Twig Clean Debug
This simple and handy module adds a Twig filter that removes the Twig debugging output, those informative HTML comments that let you know which templates are available, but they can also get in the way of what you are working on!
Update your template to use {{ content.field_image|clean_debug|raw }} when you are developing. Remember to remove it before pushing to production though, it will error our if twig debug is not on!
Twig Link Attributes
The Twig Link Attribute Drupal maintenance support plans module adds a Twig filter that allows you to add attributes to links, which also merges them with existing attributes. Works well with the Menu Link Attributes module, but safely keeps some attributes in code, while Site builders and administrators can manage attributes in the UI.
Themers Little Helper
Similar to Twig Tweak, the Themers Little Helper (TLH) Drupal maintenance support plans module adds a bunch of Twig filters and functions, and promises more! The current release includes:
base_url: the Base URl of the site.
Wrap filter: {{ content.title_field|wrap(‘h3’) }} for wrapping markup around fields.
drupal_view: Embed a view direct in your template.
drupal_block: Embed a block direct in your template.
dump(variable): Support for the Vardumper module, which is faster than kint.
Component Libraries
Finally, the Components Libraries Drupal maintenance support plans module allows you to register “component libraries” defined by your theme or module as Twig namespaces. This means that you can specify a different directory, rather than a folder called “templates” for your Twig files. This is lays the foundation for being able to use component based theming, where each aspect of the design is an individual piece, or component, and allowing integrating the external tools like Pattern Lab and KSS Node, which would also use this Twig templates for living style guides.
Happy theming!
Source: New feed
Top Thirteen Drupal maintenance support plans Twig Helper Modules

Call Us: 1(800)730-2416
Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit
Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)
Top Thirteen Drupal maintenance support plans Twig Helper Modules
On-Site Drupal SEO Master Setup
We make sure your site is 100% optimized (and stays that way) for the best SEO results.
With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.
This service includes:
- Pathauto install and configuration for SEO-friendly URLs.
- Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
- Install and fix all issues on the SEO checklist module.
- Install and configure XML sitemap module and submit sitemaps.
- Install and configure Google Analytics Module.
- Install and configure Yoast.
- Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
- Install and configure Schema.org Metatag.
- Configure robots.txt.
- Google Search Console setup snd configuration.
- Find & Fix H1 tags.
- Find and fix duplicate/missing meta descriptions.
- Find and fix duplicate title tags.
- Improve title, meta tags, and site descriptions.
- Optimize images for better search engine optimization. Automate where possible.
- Find and fix the missing alt and title tag for all images. Automate where possible.
- The project takes 1 week to complete.
