Blog
Five ways of using the path twig function for route links in drupal 8, 9 or 10
Linking to routes in Twig has become much easier since the release of some updates in Drupal 8. Here are 5 snippets that help when linking to internal routes.
Blog
Check in twig if image field has value [drupal 8]
In a node teaser or full view mode it is for front-end purposes needed to know if an image is available. This snippet takes care of it.
Blog
Get views row count in twig [drupal 8]
When using twig, sometimes you would like to know whether the view has results or not. This snippet shows you how.
Blog
Date field formatting in twig in drupal 8
The following snippet makes you format a date field inside a twig file.
Blog
Twig snippet to hide region if empty in drupal 8
I encountered this bug in a Display suite 2-column lay-out where I wanted the left region to disappear when empty.
Pagination
- Previous page
- Page 2