Is there a way to programmatically load a views block that isn't active in the config(not placed under admin->structure->block layout).
My usual method to load a block programmatically is something like the following in hook_preprocess_node
:
$block = Block::load('views_block__courses_block_3');
$block_render = \Drupal::entityTypeManager()->getViewBuilder('block')->view($block);
However, that seems to just return null
if I haven't placed the block into a region after creating it under views.
Also noticed that the block isn't listed in the config table until placed into a region.