How to make a Drupal 8 local task title dynamic

When defining local tasks (= tabs) in your Drupal 8 modules, you can specify a title for the tab via the 'title' property in your [MODULENAME].links.task.yml file.

However, in some cases you might want to make the task title dynamic, e.g. depending on the context of the entity where the tab is displayed.
This can be achieved by overriding the \Drupal\Core\Menu\LocalTaskDefault class with your own class for that tab.

Here is an example that uses a callback function to dynamically set the title, both for the route and the local task:

 

Using Drupal 8 contact forms via REST

While working on Narwhal CMS, our hosted decoupled / headless CMS service built on Drupal 8, a feature request that has popped up multiple times is the ability to have (contact) forms in the frontend application or website be processed by the Drupal backend through REST. Drupal 8 provides you with REST services and fieldable contact forms out of the box, but doesn't provide all the pieces to get this specific use case working. In the tutorial below I will show you how to implement this on your Drupal 8 website.

Book review: Drupal 7 Development by example

In the book 'Drupal 7 Development by Example', author Kurt Madel guides the reader through the process of building a Drupal 7 website. Step by step we are building an HTML5 interactive recipe website. The book covers setting up content types, using Views to list recipes and create blocks, integrating the Media module, HTML5 theming and enhancing the website markup with Microdata. Furthermore widely used modules such as Webform, Fivestar, Views Slideshow and Features are covered.

Book review: Drupal 7 Webform Cookbook

In the book "Drupal 7 Webform Cookbook" author Vernon Denny takes us on a journey through the various aspects concerning the popular Webform Drupal module. Readers of this book are shown step by step how to leverage the power of this module, and associated other contributed modules that extend its functionality, to create everything from simple contact forms to complex, multipage and conditional forms.

How to migrate part of a Drupal project to a new project repository

This is a writeup of a problem I encountered when working on the CollectiveAccess Drupal module: I had been maintaining a submodule called CollectiveAccess Feeds within the main Drupal CollectiveAccess project, but I found out that it would be more practical to have this as a separate module, in order to move it faster then the CollectiveAccess module itself, which is already more stabilized. Continue reading to see the steps I took to migrate this module to a new Drupal project.