1 July
Page template for Content Type, Node ID
Published On: Thu, 07/01/2021 - 12:43
function mythemename_theme_suggestions_page_alter(array &$suggestions, array $variables) { // Get Request Object. $request = \Drupal::request(); // If there is HTTP Exception.. if ($exception = $request->attributes->get('exception')) { // Get the status code. $status_code = $exception->getStatusCode(); if (in_array($status_code, array(401, 403, 404))) { $suggestions[] = 'page__' . $status_code; } } if ($node = \Drupal::routeMatch()->getParameter('node…