Posted by oskar_calvo on December 17, 2012 at 8:54pm
Hello.
I'm looking for something like node_type_get_names but for view_mode. Is there any function?
Thanks
Oskar
Hello.
I'm looking for something like node_type_get_names but for view_mode. Is there any function?
Thanks
Oskar
Comments
Here is what I use to get all
Here is what I use to get all the view modes for an entity type. Depending on the context you may want to filter by bundle.
$entity_info = entity_get_info($entity_type);$view_modes = $entity_info['view modes'];
Thanks nevets. Oskar
Thanks nevets.
Oskar
gestión del conocimiento y de la información con software libre