I’m trying to add a block into a layout builder, but it seems the ‘getSections’ for a node which is currently at the default layout does not output anything, not sure if it’s a bug or if that’s intended behaviour… getSections will only output items if the layout for the node has deviated fromt he default…
ie:
$entity = Drupal::entityTypeManager()->getStorage('node')->load('127'); $layout = $entity->get('layout_builder__layout'); $sections = $layout->getSections(); dpm($sections, 'sections');
$sections will be empty unless that node has had it’s layout modified…is that normal behaviour?? seems like a bug, shouldn’t the default sections still be outputted?