materio-d9/web/modules/custom/materio_home/includes/materio_home.inc

14 lines
314 B
PHP

<?php
use Drupal\Core\Url;
function template_preprocess_materio_home(&$vars){
$node_view_builder = \Drupal::entityTypeManager()->getViewBuilder('node');
$vm = "default";
$fpnode = $vars['frontpage_node'];
$nvb_fpnode = $node_view_builder->view($fpnode, $vm);
$vars['frontpage_node'] = $nvb_fpnode;
}