Skip to main content
Error occurs when trying to programmatically create an order.
Follow me here
Delete all terms from vocabulary [drupal 8]
When importing tags, or when in development, you would sometimes need to delete all terms from a vocabulary. This snippet does the trick for you.
about Delete all terms from vocabulary [drupal 8]
Link to a node in twig [drupal 8]
Twig is the theme engine in drupal 8 sites. This snippet how to link to nodes correctly, without using preprocess functions to do it.
about Link to a node in twig [drupal 8]
Set format of date field in twig using drupal 8
Twig comes with quite some handy functionalities. Date formatting is an example. In this snippet an example of how to show the created date in a drupal 8 time format.
about Set format of date field in twig using drupal 8
Drupal 8 trim body text in twig
Sometimes you need a body text that is trimmed. No need to install contrib modules.
about Drupal 8 trim body text in twig