created lastdocs home block and corresponfing page
This commit is contained in:
@@ -93,6 +93,34 @@ function template_preprocess_edlp_home(&$vars){
|
||||
// )
|
||||
// );
|
||||
|
||||
|
||||
// render the lasts documents of collection as list
|
||||
$lastdocs_url = Url::fromRoute('edlp_corpus.lastdocs');
|
||||
$lastdocs = array(
|
||||
'#type'=>"container",
|
||||
'title'=>array(
|
||||
'#prefix'=> '<h3>',
|
||||
'#title' => t("Last documents"),
|
||||
'#suffix' => '</h3>',
|
||||
'#type' => 'link',
|
||||
'#url' => $lastdocs_url,
|
||||
'#options'=>array(
|
||||
'attributes' => array(
|
||||
'data-drupal-link-system-path' => $lastdocs_url->getInternalPath(),
|
||||
'class' => array('ajax-link'),
|
||||
)
|
||||
)
|
||||
),
|
||||
'list'=> array(
|
||||
'#theme' => 'item_list',
|
||||
'#items' => [],
|
||||
),
|
||||
);
|
||||
foreach($vars['lastdocs_items'] as $node){
|
||||
$lastdocs['list']['#items'][] = $node_view_builder->view($node, 'search_index');
|
||||
}
|
||||
$vars['lastdocs'] = render($lastdocs);
|
||||
|
||||
// render the next events of agenda as list
|
||||
$agenda_url = Url::fromRoute('edlp_agenda.agenda');
|
||||
$agenda = array(
|
||||
|
||||
Reference in New Issue
Block a user