Stop rendering custom entity label in view mode I have declared a custom entity with a schema with a few fields on which is all working as I expect. 

I want to remove the label when rendering the entity so have tried the following. 

Added some view modes to the entity info hook and although I can see that they exist when I go to manage display none of my entity fields appear. Not sure if this is how it should work or not.

Any ideas?
The below function stops a custom entity label from being rendered based on the view mode.

function HOOK_entity_view_alter(&amp;$build, $type) {
  if($type == 'YOUR_ENTITY_TYPE' &amp;&amp; $build['#entity_view_mode']['view_mode'] == 'YOUR_VIEW_MODE'){
    $build['#page'] = TRUE;
  }
}