Skip to main content

Render Block View Helper


Locate and return template part with passed attributes for a block.


Inside your block view PHP file you'd write:

'blockClass' => $attributes['blockClass'] ?? '',
'heading' => $attributes['heading'] ?? [],

In the case you are using libs with dependency injection container, this should be handled by the library and the render_block_view method is provided in block view by default.