admin's blog

Drupal - Add Current Page in Breadcrumb

Drupal 8 development

Introduction

Breadcrumb navigation is a core feature in Drupal 8. But by default, breadcrumb do not show current page. In this tutorial we will add current page in the breadcrumb navigation in our theme. This can be achieved by editing our theme file THEME-NAME.theme

Step 1

Open THEME-NAME.theme file of your theme in any text editor.

Why Overlay Module do not work in some Drupal themes

Some of our themes might not support Drupal overlay module. This is because these themes comes with latest stable version of jQuery.

If you check the error using inspect element of browser, you will find following error message.

TypeError: jQuery.browser is undefined

The overlay module do not work with jQuery version 1.9 and later. It's because $.browser is deprecated in jQuery 1.9 and overlay module need this to work. So, its good to disable overlay module from:

Drupal Error - Fatal error Class 'PDO' not found

Your drupal powered website may show error message like PDO not found.
The error message may be something like this:

Fatal error: Class 'PDO' not found in /home/username/public_html/includes/database/database.inc on line 184

Solution

  1. Create a file php.ini in public_html folder
  2. Add following code:
    extension=pdo.so
    extension=pdo_mysql.so
  3. Save php.ini file

Done!!!

Pages