Blog
Get the current url path alias in drupal 8, 9 & 10
This snippet sums op the possibilities of getting the current url path alias.
Blog
Disable css of a hubspot form
HubSpot is a marketing automation tool that offers forms to embed on your website. Here's how to disable the css that comes with it.
Blog
Blog
Custom container width in Tailwind css
Snipet to make container larger or smaller on certain breakpoints
Blog
Get is_front frontpage variable in node.html.twig twig file
This is quite an easy one. I want to know in my node.html.twig file if i'm on the homepage of the site. This snippet does the trick.
Blog
Get logo path of custom theme in page.html.twig in drupal 8 or 9
The site logo moved to a block in drupal 8 but with this snippet you are still able to get the custom logo path, as defined in your settings file.
Blog
Scrape first available text from your node and save them as meta description in drupal 8
Metatags can be hard when abandoning the body field in favor of paragraphs. This post gives you a generic solution for the problem.
Blog
Set first paragraph text as description of metatag
Most websites abandon the body field in favor of paragraphs. One flaw this has, is that no longer a summary is provided for your (auto-generated) meta description. This snippet fixes this issue.
Blog
Prevent drupal from sending e-mails [drupal 8 or 9]
There are use cases where you do not want drupal to send any mails at all. Here's a snippet that does the trick.
Blog
Display a config value in your theme page.html.twig file in drupal 8 or 9
Often we create a custom settings form with stuff like social media url's or addresses. With this snippet you make the variables available in your page.twig.html file.