Node id inside views template?
If using fields as the display type the data will not be readily available in the display or style output, but can easily be gotten in the field tpl's by accessing the $row object which has all of the original raw data from the database.

Click on Theme: Information when in Views (editing the view in question) and you'll see all of the template recommendations to use. You'll probably want to use a tpl file that involves both the view and field name, e.g. view-view-field--[view_name]--field-[field_name].tpl.php.

Once you've created this tpl file you can access the following variables:


$view: The view object
$field: The field handler object that can process the input
$row: The raw SQL result that can be used
$output: The processed output that will normally be used.


You could do something special in &lt;?php ?&gt; and then print it like normal. For example, this would print out a specific field from a node that's referenced in a node_reference field:

Contents of view-view-field--blog--field-blog-parent.tpl.php:

&lt;?php
$a_referenced_node = node_load($row-&gt;{$field-&gt;field_alias});
if ($a_referenced_node) {
  print $a_referenced_node-&gt;field_some_other_field[0]['value'];
}
?&gt;