I'm using Display Suite which is awesome and an easier solution if you're not a coder. Now that I have created several view modes I'd like to set a particular view mode that is based on a field setting (a taxonomy term in my case) in the viewing user's account setting (I guess that's also called the user's profile, right?). It seems that DS is mostly used in conjunction with Views but I simply want users to get a different view mode when viewing the node without Views. I think I'll have to create a separate module for that or add a preprocess function to my template file but I have no idea where to start. Can anyone share their suggestions with me on how to do this? I'm not a coder but I think I can implement some code, though. Cheers!

1 Answer 1


Not entirely sure if i understood your question, but I believe the Entity view modes module might help you to define custom view modes for entities, which in your case could be a taxonomy term field in your node type or user profile.

The Drupal 7 successor to Build modes which will allow administrators to define custom view modes for entities. Custom entities are added to the entity registry via hook_entity_info_alter() so they are available to any code that uses entity_get_info() to provide a list of view modes for an entity. This includes node and user reference fields, Views, etc.

  • Is Entity View Modes not just another form of Display Suite? I'd rather not bloat my site with redundant modules, though. Again, I'm not reluctant to put some code into the template.php file or any other file but I just don't know how to go about.
    – BassPlaya
    Commented May 26, 2014 at 14:11

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.