1234567891011121314151617181920212223242526 |
- <?php
- function template_preprocess_edlp_home(&$vars){
- $view_builder = \Drupal::entityTypeManager()->getViewBuilder('node');
- // dpm($vars);
- // render the presentation node
- $vars["presentation"] = $view_builder->view($vars["presentation_node"], 'default');
- // TODO: last fil
- // render the last production node
- $vars["last_production"] = $view_builder->view($vars['last_production_node'], 'teaser');
- // render the next events of agenda as list
- $agenda = array (
- '#theme' => 'item_list',
- '#items' => [],
- );
- foreach($vars['agenda_items'] as $node){
- $agenda['#items'][] = $view_builder->view($node, 'teaser');
- }
- $vars['agenda'] = render($agenda);
- }
|