Blog
Accessing and setting values of field properties of entities in Drupal
Here are some ways to access field properties on entities in Drupal
Blog
EntityQuery access check will be enforced in Drupal 10
Until Drupal 9.2, if ::accessCheck() is not called then the query would default to checking access, i.e. behave as if ::accessCheck(TRUE) had been called.
Blog
How to add HTML to Drupal Messenger API service
Drupal now has a messenger service, powered by the class Drupal\Core\Messenger\Messenger. Here is how you can add HTML to the message
Blog
How to: cacheable JSON response in Drupal 8, 9 & 10
In my book Learning Drupal as a framework, we learn some nice things about cacheable dependencies. Recently I had to provide a JSON controller with cached data.
Blog
How to add direct share links to your Drupal page in page.html.twig
The following snippets can be used to get direct share links to Facebook, Twitter and LinkedIn in your page.html.twig
Blog
Get a link field url and value in Twig for both internal and external links
Drupal's link field is quite generic. You can both add internal paths as external links. Here is how get the correct values in twig.
Blog
How to: install an existing Drupal site on Lando
This tutorial explains how to install an existing Drupal 9 website locally with Lando.
Pagination
- Previous page
- Page 11
- Next page