How to redirect based on views results? I have a view that shows a list of nodes and has a contextual filter. 
If the number of nodes shown is only 1 then I want to redirect to that node page instead of showing the view. 
Can I do that in views or do I have to code it?
I don't think Views does anything like that by default, but a quick...

if (count($view-&gt;result)==1) {
  drupal_goto('node/' . $view-&gt;result[0]-&gt;nid);
}


...at the beginning of a display output template for the view in question should do it for you. 

Or better yet, per @MPD...

function MOTOMODULE_views_pre_render(&amp;$view) {

  if ($view-&gt;name=='JUSTONEPLEASE' &amp;&amp; count($view-&gt;result)==1) {
    drupal_goto('node/' . $view-&gt;result[0]-&gt;nid);
  } 

  // any other pre_render()ing here

}