How to render a node with different DS View modes depending on taxonomy term? I have a Content type containing a term reference field and some other fields. I have created 3 Display suite view modes for this content type. I want each node of this content type to be displayed in one of the defined DS view modes depending on the value of the term reference field of that node.
You can switch view modes using hook_entity_view_mode_alter. In pseudo code, something like:

function your_module_entity_view_mode_alter(&amp;$view_mode, $context) {

    //check that this is a node of typex, and check current view mode
    if ($context['entity_type'] == 'node' &amp;&amp; $context['entity']-&gt;type == 'typex' &amp;&amp; $view_mode == 'full') {

      //check current taxonomy terms
      [code]

      //code to set view mode
      if (condition based on taxonomy terms) {
        $view_mode = 'new_view_mode';
      }
    }
}