materio_home.inc 314 B

12345678910111213
  1. <?php
  2. use Drupal\Core\Url;
  3. function template_preprocess_materio_home(&$vars){
  4. $node_view_builder = \Drupal::entityTypeManager()->getViewBuilder('node');
  5. $vm = "default";
  6. $fpnode = $vars['frontpage_node'];
  7. $nvb_fpnode = $node_view_builder->view($fpnode, $vm);
  8. $vars['frontpage_node'] = $nvb_fpnode;
  9. }