Hi Team,
We use hook_entity_view_mode_alter()
to change the view mode of an entity based on some conditions, but we also require the ability to override it with Layout Builder on the entity level. It seems that Layout Builder doesn't know about the hook; thus, it gets the layout from the default full view mode,
Expected Behavior
If the view mode has been changed by hook_entity_view_mode_alter()
, the Layout Builder override should get the layout from the new view mode.