Node id in views template
From a similar issue - you can find details here (or just search for views preprocessor):

A preprocessor will give you access to the data, instead of rendered html which you find in the tpl file.


  There aren't dynamically generated preprocess functions; instead, all
  of the theme functions use the base preprocessor automatically. So
  views-view--my-first-view.tpl.php still uses
  template_preprocess_views_view(&amp;$vars) as its preprocessor function.
  
  You can add preprocess functions for specific views with the exact
  same naming conventions. Note that that it's named *preprocess not
  preprocessor_.
  
  Note that currently Drupal's design requires that you have the
  .tpl.php file in order to have the preprocess function (though you
  could drop in a generic preprocess function and do switches based upon
  information contained within the $vars['view'] variable. There's an
  issue for this which is fairly easily found by going to the Drupal
  queue and searching in the 'theme system' queue.