I want to use a different display format ( hiding selected fields ) for a node when opened in a Colorbox pop-up from a specific View table record. I understand this is possible using hook_node_view and passing the view mode as a parameter - i.e.

function hook_node_view($node, $view_mode, $langcode)

Will this work ? And if so:

  • How do I restrict the code to run only if called from a specific view ?
  • What other code needs to go into the function ? If changes to fields are made in the view mode, is any other code required ?

Any help here much appreciated. Thanks.