How to access field in view template? I am trying to access from views-view-field--title.tpl template to another field...

I have this code:

&lt;?php print $output;
  print $row-&gt;{$view-&gt;field['field_NAME']-&gt;field_alias};
 ?&gt;


But it shows me just a number.. (1,2,3,4,5,....)

Can someone help me?

Thank you!
I'd suggest that you enable the Devel module on your drupal site (hopefully not a production version ;-).  Once you've enabled that module, you can use the dsm() function, within php tags in your templates to inspect in detail the variables that are provided in each template!

So enable the Devel module, then add the following to your template file:

&lt;?php dsm($view-&gt;field['field_NAME']); ?&gt;


Clear your cache and go to a page that contains a view... What the dsm() function should do is output your object in the 'Help' section of your page:



Just click on the object and start inspecting all the fields it has available.  You'll see that what it's returning with the 'field_alias' property is just the nid of that node... 

Since you didn't specify what you're trying to get with the additional field, I can't be any more specific, but hopefully digging around will let you figure out how to get to the field property/properties you need.  Let us know if you figure it out!

p.s.  Since the 'title' field template is called for each row displayed in your view, you will get that 'field' object multiple times - once for each time the template was called.