- Issue created by @Spanners
- 🇦🇺Australia Spanners Sydney
Managed for fix my issue by adding the following to my .theme file:
use Drupal\node\NodeInterface; /** * Implements hook_theme_suggestions_page_alter(). */ function mytheme_theme_suggestions_page_alter(array &$suggestions, array $variables) { // Try accessing node directly from the route $node_from_route = \Drupal::routeMatch()->getParameter('node'); if ($node_from_route instanceof NodeInterface) { \Drupal::logger('csbb')->notice('Node found from route match: @type', [ '@type' => $node_from_route->getType(), ]); $suggestions[] = 'page__node__' . $node_from_route->getType(); } }
- Status changed to Closed: works as designed
7 days ago 1:44pm 24 August 2025