Drupal 8 Development

Drupal 8 - Add Current Page in Breadcrumb

Drupal 8 development


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.

Step 2

Add following code in THEME-NAME.theme

Disable Cache Before developing Drupal 8 Theme

Drupal 8 Theme Developer

I recently started developing Drupal 8 theme. But every time I was making any change, I had to clear Drupal cache. So, here is how you can disable Drupal cache when developing theme / module for Drupal 8.

Step 1

Copy and rename /sites/example.settings.local.php to be /sites/default/settings.local.php