1

I want to theming every row of a view with "display suit - display mode".

The idea is that depending of a taxonomy selected in the node the row use one or other display mode.

I'm able to make it with a a views*rows-tpl.php, but I'll like to make it with display suit.

I have try with VCD but seems that VCD is only for DS 7.1.x, and it don't support multiples context

If multiple contexts are tripped for a view, then the last active contexts' build mode will be used for that view, overriding all other active contexts.

I'm trying with ds_views_row_adv_VIEW_NAME

<?php 
/**
* ds_views_row_adv_VIEW_NAME($entity, $view_mode, $load_comments).
*/
function ds_views_row_adv_prueba_display($entity, $view_mode, $load_comments) {

if($entity->field_prueba_display['und'][0]['tid'] === '3'){
//select the new view_mode
  $view_mode = 'derecha';

}

  $entity = node_view($entity, $view_mode);


//  dpm($entity);
//  dpm($view_mode);
//  dpm($load_comments);

  return drupal_render($entity);
}
?>

But it don't work fine and only use one kind of view_mode.

Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.