Trying to make view template I have a content-type that has an imagefile and a url; I want the url to wrap around the image. So I'm trying to make a viewtemplate based on the information in Theming information

based on this description

/**
  * This template is used to print a single field in a view. It is not
  * actually used in default Views, as this is registered as a theme
  * function which has better performance. For single overrides, the
  * template is perfectly okay.
  *
  * Variables available:
  * - $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.
  *
  * When fetching output from the $row, this construct should be used:
  * $data = $row-&gt;{$field-&gt;field_alias}
  *
  * The above will guarantee that you'll always get the correct data,
  * regardless of any changes in the aliasing that might happen if
  * the view is modified.
  */


I made views-view-field--my-view--block--field-image.tpl.php to look like this:

$url = $row-&gt;{$field-&gt;URL}
?&gt;
&lt;a href="&lt;?php echo $url; ?&gt;" target="_blank"&gt;
  &lt;?php print $output; ?&gt;
&lt;/a&gt;


But I'm getting Cannot access empty property on the $row-&gt;{$field-&gt;URL} line. Can I only access the image field from within the template for the image field? I was looking at views-view-fields--my-view--block.tpl.php but not sure how to access things from in there
I would do the following:
    &lt;pre&gt;
    &lt;?php print_r ($row); ?&gt;
    &lt;/pre&gt;
This will give you the full tree of the $row