Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Given this implementation of hook_suggestions_page()
/**
* Implements hook_suggestions_page();
*/
function mytheme_suggestions_page($vars, $suggestions, $hook) {
$suggestions[] = page__my_page;
return $suggestions;
}
I would expect mytheme_preprocess_page__my_page() to override (be called after) mytheme_preprocess_page(). This is not the case because pure_preprocess() (where suggestions are implemented) is called before specific hook preprocessors.
Comment | File | Size | Author |
---|---|---|---|
#1 | support-suggestions-overrides-2053887-1.patch | 966 bytes | draenen |
Comments
Comment #1
draenen CreditAttribution: draenen commentedA quick call to hook_theme_registry_alter() should do the trick.