created home node and some computed field

This commit is contained in:
2019-05-23 17:52:46 +02:00
parent 74a821104f
commit 5d2a8bc73b
31 changed files with 651 additions and 31 deletions

View File

@@ -28,6 +28,15 @@ class HomeController extends ControllerBase {
$contents = array("#theme"=>'materio_home');
// presentation
$query = \Drupal::entityQuery('node')
->condition('status', 1)
->condition('nid', 19990);
// TODO: présentation nid should be a setting
$pres_nid = $query->execute();
$contents["#frontpage_node"] = entity_load('node', array_pop($pres_nid));
return $contents;
}