how to get data in views templates I am trying to use the field data inside of a views template to modify its output. I looked at the available fields with devel, and, inside of a field template, I used the following code:

$row-&gt;field_field_twitter_screen_name[0]['rendered']['#markup']


and many more like this. It worked fine. The only issue is that the page was giving me a lot of notice message from this code:

*   Notice: Undefined offset: 0 in include() (line 28 of [path-to-file].tpl.php).


Is this not the correct way to get data? If so, what is it?
It shows you the Notice because somewhere in your data array you have missing data for a specific node. As for being correct, yes, it is a good way to alter the output. Try checking the data before printing it.

Something like

if(isset($row-&gt;field_field_twitter_screen_name[0]['rendered']['#markup'])) {
  //do custom action here
}


Edit: You can also make good use of $content variable here.