How to access nid in views I'm trying to build a simple module that renders facebook like boxes for each article. To do that, I need to know full absolute path to article.

I have my views set up to show all published posts as content (teaser). But I would like to insert a custom markup after each item. For that I need to know nid, so I can build a link that leads to article. How can I do that?

Here is how my views is set up: http://i.imgur.com/bMHtzTo.jpg
If you're using the rendered entity style I don't think you can do it through the UI - Views passes off the display to node_view() in that case, and doesn't get involved with the markup for the row.

The easiest way to do what you want is to implement hook_preprocess_node(), look for a View in the current context, and if the node is being rendered as part of that display, you can make some alterations.

For example

function MYMODULE_preprocess_node(&amp;$vars) {
  if (!empty($vars['view']) &amp;&amp; $vars['view']-&gt;view_name == 'foo') {
    $nid = $vars['node']-&gt;nid;
    $vars['extra_link'] = l('Some text', "node/$nid");
  }
}


Then in your node.tpl.php file you'll have access to $extra_link.