our blog

Blogs

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:

Pages