finished home contents, created edlp_fils custom module
This commit is contained in:
@@ -1,20 +1,71 @@
|
||||
<?php
|
||||
|
||||
use Drupal\Core\Url;
|
||||
|
||||
function template_preprocess_edlp_home(&$vars){
|
||||
$view_builder = \Drupal::entityTypeManager()->getViewBuilder('node');
|
||||
// dpm($vars);
|
||||
|
||||
// render the presentation node
|
||||
// render the presentation column
|
||||
$vars["presentation"] = array(
|
||||
$view_builder->view($vars["presentation_node"], 'default')
|
||||
"#type"=>"container",
|
||||
"pres"=>$view_builder->view($vars["presentation_node"], 'default'),
|
||||
"link"=> array(
|
||||
'#title' => t('Visiter la collection sonore.'),
|
||||
'#type' => 'link',
|
||||
'#url' => Url::fromRoute('<front>', [], array(
|
||||
'attributes' => array(
|
||||
'class' => ['corpus-link', 'ajax-link']
|
||||
)
|
||||
))
|
||||
)
|
||||
);
|
||||
|
||||
// render the last fil node
|
||||
$vars["last_fil"] = $view_builder->view($vars['last_fil_node'], 'teaser');
|
||||
// render the last fil column
|
||||
$vars["last_fil"] = array(
|
||||
"#type" => "container",
|
||||
'fil' => $view_builder->view($vars['last_fil_node'], 'teaser'),
|
||||
'links' => array(
|
||||
'#theme' => 'item_list',
|
||||
'#items' => array(
|
||||
'link_all' => array(
|
||||
'#title' => t("Voir tous les fils de l'EP."),
|
||||
'#type' => 'link',
|
||||
'#url' => Url::fromRoute('edlp_fils.fils', [], array(
|
||||
'attributes' => array(
|
||||
'class' => ['fils-link', 'ajax-link']
|
||||
)
|
||||
))
|
||||
),
|
||||
// TODO: link posdcast fils
|
||||
'link_podcast' => array(
|
||||
'#title' => t("S'abonner au podcast des fils."),
|
||||
'#type' => 'link',
|
||||
'#url' => Url::fromRoute('<front>', [], array(
|
||||
'attributes' => array(
|
||||
'class' => ['fils-link']
|
||||
)
|
||||
))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
// render the last production node
|
||||
$vars["last_production"] = $view_builder->view($vars['last_production_node'], 'teaser');
|
||||
);
|
||||
|
||||
// render the last production column
|
||||
$vars["last_production"] = array(
|
||||
'#type' => 'container',
|
||||
'prod' => $view_builder->view($vars['last_production_node'], 'teaser'),
|
||||
'link'=> array(
|
||||
'#title' => t('Voir toutes les productions.'),
|
||||
'#type' => 'link',
|
||||
'#url' => Url::fromRoute('edlp_productions.productions', [], array(
|
||||
'attributes' => array(
|
||||
'class' => ['productions-link', 'ajax-link']
|
||||
)
|
||||
))
|
||||
)
|
||||
);
|
||||
|
||||
// render the next events of agenda as list
|
||||
$agenda = array (
|
||||
|
||||
Reference in New Issue
Block a user