Add support for page template

Created on 22 September 2020, almost 4 years ago
Updated 31 December 2023, 6 months ago

I've added the following to the bottom of zuvi.theme, it allows using page templates per content type.

/**
 * Implements hook_theme_suggestions_page_alter().
 */
function zuvi_theme_suggestions_page_alter(array &$suggestions, array $variables) {
  if ($node = \Drupal::routeMatch()->getParameter('node')) {
    $suggestions[] = 'page__' . $node->bundle();
  }
}
✨ Feature request
Status

Closed: works as designed

Version

1.5

Component

Code

Created by

🇬🇧United Kingdom bigmonmulgrew

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024