drupal

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:

 

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.

Case study: James Ensor - An Online Museum

On February 25th, the Flemish Art Collection (Vlaamse Kunstcollectie) launched a virtual museum about the Belgian artist and painter James Ensor on www.jamesensor.eu. This website was built using popular open source technology such as Drupal, CollectiveAccess and Apache Solr.

The implementation of the collection management backend system and public website was done by Pure Sign in collaboration with Koba.