Cannot seem to get hook_preprocess_page to work in 8.4.2

by Bishoy   Last Updated November 13, 2017 11:07 AM

Why do I get to the breakpoint in MYMODULE_preprocess_page_title but not in MYMODULE_preprocess_page?

What I am tying to achieve is to update page title both on the top of the page and in the browser title bar/tab name.

The following code only affects the title on the top of the page.

function MYMODULE_preprocess_page_title(&$variables) {
  $variables['title] = 'Something Different!';
}

I've read some people are saying hook hook_preprocess_page instead to update both.

I tried to find what are the available hooks like hook_preprocess_blabla starting here, but couldn't find my way in the documents to the list of available hooks.

Tags : 8 hooks


Related Questions


How to find hooks being called by a Drupal page?

Updated April 03, 2015 21:20 PM

Modify text of error message for required field

Updated April 22, 2015 20:03 PM


Where are hooks stored/cached?

Updated April 13, 2015 20:03 PM