Blog

Serve a pdf download in controller in drupal 8

Quick tutorial on how to serve a PDF that downloads automatically in your browser in drupal 8.

Blog

Change the page title of the user edit form in drupal 8 with a RouteSubscriber

Sometimes simple tasks like changing a page title of a system page can be hard. Luckily, drupal 8 provides clean ways to do that. In this tutorial some info about RouteSubscribers.

Blog

How to create menulink programmatically in drupal 8 [SOLVED]

When creating seed data, for example in your modules hook_install() script, creating a menulink can be necessary. This snippet shows how.

Blog

Use html markup in form labels in drupal 8

Getting the output like you want it to be an be quite a challenge in drupal. This snippet shows you how you can add markup to your form labels in drupal 8.

Blog

Validate a UUID in drupal 8 (check if uuid is valid)

In drupal 8, each entity will get a UUID assigned automatically. With this snippet you can check if it is a valid one.

Blog

Drupal 8 check if user is logged in

Check if a user is logged in in drupal 8

Blog

Create or add a menu item without a link in drupal 8

In drupal 7 we had some contrib modules using a <nolink> tag to make subtitles in our menu. In drupal 8 I try to avoid contrib modules on my menu items. Here's a hint on how to get it to work.</nolink>

Blog

Set placeholder for Chosen widget in drupal 8 form alter

The chosen widget is my default option for select widget. This snippet shows you how to add the placeholder in a form alter.

Blog

Create an instagram widget of an hashtag in drupal 8

For a few months I'm working in my spare time on a module that can import instagram feeds and turn it into nodes. And on top of that, a nice javascript extension to make it look beautiful out-of-the box.

Blog

Make sure javascript keeps working after ajax call in drupal 8 [solved]

A thing developers can forget while testing, is to make sure all functionality of your module is stable when used in the context of ajax. Some plugins might stop working after an ajax call on the page. This is how to prevent such thing.

Subscribe to