I'm pretty new to Drupal, and very new to Drupal 8. I've created a view, and have set up it up with a display block. I'm trying to render this on a specific page. So, I created a page template and a preprocess hook, created the following function.
function MYTHEMENAME_preprocess_node__13(&$variables) {
$block = \Drupal\block\Entity\Block::load('views_block__downloads_block_2');
$block_content = \Drupal::entityManager()->getViewBuilder('block')->view($block);
$variables['downloads'] = $block_content;
}
When I place {{ downloads }}
in my page template (page--node--13.html.twig
) nothing happens.
Any ideas what I might be doing incorrectly?