Drupal 9

Drupal versions built on Symphony Framework.

Drupal 9

Iterate through entities in Drupal 9

11 Nov, 2022
You can iterate through entities using entitiyQuery. In this simple snippet you can see that the only condition is type. So using this exact one you can iterate through entities in a certain node...
Drupal 9

Get node url in Drupal 9 Twig

31 Oct, 2022
You need to get content url using path, to make sure all translations work and you are going into the correct absolute path. This snippet shows how to get link for nodes by id.
Drupal 9

Paragraphs from csv in Drupal 9

27 Oct, 2022
Create and add paragraphs programmatically to nodes. After trying to use migrate and feeds. Including migration from field collection to paragraphs or ECK. The final solution for me was to do it...
Drupal 9

Drupal 9: Redirect all traffic to https with .htaccess

23 Oct, 2022
Using .htaccess to force redirect traffic from http to https is the most simple way in Apache. If you have more access to your server, you can do it in VirtualHosts configuration. With redirecting...
Drupal 9

Get view url in Drupal 9 Twig

12 Oct, 2022
Instead of hard-coded URL, it's better to use URL function so the other data url parameters/data won't be lost.
Drupal 9

Get all languages in Drupal 9

10 Oct, 2022
Gets the list of languages set up on the site.