1

Is there a way to create multiple displays for an existing entity?

The node has already Full content, Teaser, RSS, Search index, Search result display types. I was wondering if I can add more to these or to any other entity.

Thanks :)

2 Answers 2

1

You can use display suite module. this is your answer

1
  • I think hook_entity_info_alter(&$entity_info) is what I was looking for. I just need it so I can invoke it from code later on. Commented May 9, 2012 at 15:06
2

I think this is the answer I was looking for:

function hook_entity_info_alter(&$entity_info) {
  $entity_info['entity_type']['view modes']['custom mode'] = array(
    'label' => t('Custom view mode'),
    'custom settings' => FALSE
  );
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.