-
An easier way to get the current node in a block plugin in Drupal 8
It is over a year since I wrote how to get the current node in a block plugin and promised to write a follow-up post with an easier method. Well, better late than never, here it is! The previous method works, so why bother with another method? In short, it’s less code and less code…
-
Open content in new tab with an image formatter
One of my sites has a listing of content shown as teaser. The teaser for this content type is defined to show the title, an image, and a few other fields. In the listing, the image is linked to the content so that the visitor may click on the image (or the title) to open…
-
How to get the current node in a block plugin in Drupal 8
I was trying to build a block plugin in Drupal 8 recently. The requirement was straight-forward. I would show these blocks on node pages of a certain type. Depending on the values in that node, the block content changes. UPDATE: I wrote a follow-up post with an easier method to get the node. The requirements…
-
Porting token module to Drupal 8
Now, token is a module everyone needs and no one knows, especially after token is mostly in core since Drupal 7. How can that still be dev two months after Drupal 8 final?!