How to use field variables in un-formatted view template? If found this, but I can't manage to apply it to my case. Here goes. (I'm new to PHP coding and Drupal.)

I want to add a HTML link into each row of my unformatted views template. For each row I want the link for the relevant piece of content.

I used the devel dpm to reveal the variables in the unformatted.tpl.php. But I can't find a variable for the link field. (I've added the Content: Link field in views and it's hidden.)

My understanding at the moment is I'll need to set the variable in the relevant preprocess function, which might look like this:

 function mytheme_preprocess_views_view_unformatted(&amp;$variables) {
    $link = Location of link field variable
}


And then use it in the views template:

&lt;?php if (!empty($title)): ?&gt;
  &lt;h3&gt;&lt;?php print $title; ?&gt;&lt;/h3&gt;
&lt;?php endif; ?&gt;
&lt;?php foreach ($rows as $id =&gt; $row): ?&gt;
  &lt;div&lt;?php if ($classes_array[$id]) { print ' class="' . $classes_array[$id] .'"';  } ?&gt;&gt;
    &lt;?php print $row; ?&gt;
    &lt;?php print $link; ?&gt;
  &lt;/div&gt;
&lt;?php endforeach; ?&gt;


But I can't find the link information and I can't find similar examples so I've probably gone badly wrong. How would I do that and is my basic understanding ok?
Ok so I've managed to get it working with:

&lt;?php print $view-&gt;style_plugin-&gt;row_tokens[$id]['[view_node]']; ?&gt;


I tried to use:

&lt;?php print $view-&gt;style_plugin-&gt;row_tokens[$rows['id']]['[view_node]']; ?&gt;


But it kept throwing undefined index errors, even though it was valid path from DPM.

rows (array)
  id (value) 

id (the variable I used in the top working solution) didn't show in my DPM. Is that because I was calling it for the views unformatted tpl and id is a global variable?