Create a Bootstrap Sub-theme in Drupal 8

In my first tutorial of 2018 over at WebWash, I show you how to create a Bootstrap sub-theme using Drupal 8.

I start the tutorial off by talking about Bootstrap and what it is. Then we jump right into things by showing you some of the theme’s settings and more.

After that, you’ll learn how to create a sub-theme and compile Sass using laravel-mix.

Link: Getting Started with Bootstrap in Drupal 8

Using a Pen and Paper to Avoid Distraction

In this video, I talk about how writing with a pen and paper can get the juices flowing when you’re stuck.

If you have “writer’s block”, sometimes it’s best to remove yourself from the computer and start writing on paper.

I find it easier to get into “flow” when writing on paper than typing on a computer. I think it’s because I try to edit while writing, whereas when you write on paper, you can’t revise.

You can’t delete the last sentence and start again; this helps me get into “flow”.

Continue reading “Using a Pen and Paper to Avoid Distraction”

Using Display Suite in Drupal 8: How to Use Switch View Mode Sub-module

The “Display Suite Switch View Mode” sub-module which comes with Display Suite, allows you to switch which view mode is used when displaying a node page.

It allows you to implement multiple layouts and then an editor can easily switch between them.

Link: Using Display Suite in Drupal 8: How to Use Switch View Mode Sub-module

Using Display Suite in Drupal 8: How to Use Display Suite Fields

I continue my series on using Display Suite over at WebWash by writing about how to use Display Suite fields.

Think of a Display Suite field as just a fancy formatter which can only be used when you’ve enabled Display Suite on a layout.

A block field, for example, can be implemented through the UI and they’re useful for embedding a view into a layout.

Fields can also be implemented in code if you require something custom.

To learn more about it head over to the link below..

Link: Using Display Suite in Drupal 8: How to Use Display Suite Fields

Using Display Suite in Drupal 8: How to Customize Content Pages

In my latest Drupal 8 tutorial over at WebWash, I write about how to customize content pages or, put another way, entity bundles.

Display Suite is a versatile piece of software. It converts “Manage display” page from a basic reordering interface to a drag-and-drop interface.

Instead of just moving fields up or down, you can add them to multiple regions, if the layout supports it.

Link: Using Display Suite in Drupal 8: How to Customize Content Pages

Persistent Field Storage in Drupal 8

While working on the Drupal 8 module, I discovered this option to keep field storage persistent.

By default a field storage is removed when it’s no longer used. This happens when you simply delete fields. If all the fields that use the storage have been deleted, then the field storage is no longer needed and it’s removed.

Continue reading “Persistent Field Storage in Drupal 8”

How to Print Variables using Kint in Drupal 8

When you start tinkering with a module or a theme in Drupal, eventually you’ll need to print a variable to see what’s inside.

Now in PHP you have var_dump and print_r but these functions aren’t the easiest to work with. When used they print the variable fully expanded, making it hard to filter or find anything.

In the Devel module for Drupal 7, you have the dpm and dsm which printed variables using the Krumo library. For Drupal 8, however, this library has been replaced with a more modern and maintained library called Kint.

In the latest tutorial over at WebWash, learn how to print variables within Php and the Twig template using Kint.

Link: How to Print Variables using Kint in Drupal 8