Print out $view object in custom field template I've created a custom template for a field to display in my view. Based on the view theming information, I've named the file views-view-field--at-a-glance-test--page--field-track-icon.tpl.php (the view is called at-a-glance-test, the display is a page, and the field is field_track_icon.

The sample code given for a views-view-field template has the following comments:

/**
* 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.
**/


I want to know what all is coming through in the view object, so I tried to do print_r($view). All I get is a completely blank page - there's not even a single line displayed in the rendered source. Usually this happens if there's a PHP error somewhere - am I doing something wrong? How can I print out the full contents of the view object?

EDIT

I just looked at our php error log and saw this:


  PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted
  (tried to allocate 117789481 bytes) in
  /home/www/expo/includes/theme.inc on line 1414


So obviously the view object is enormous... how else can I see what is coming through, since I have no control over our server's memory limits?

EDIT AGAIN

Per @Clive's comment below, I tried using dvm() instead of print_r, and did get some (a ridiculous amount) of output. Given that this is a template to override the display of a single field, I really want to see just the data for that particular field. So I tried dvm($field), and ended up with literally thousands of lines of nested arrays and objects. It's not pulling in just the data for this particular field, it's displaying data for the entire view, even though I passed in the field variable.

So then I tried dvm($row->field_track_icon), and got about 100 errors (Notice: Undefined property: stdClass::$field_track_icon in include() (line 28 of /home/www/expo/sites/all/themes/bluemasters/views-view-field--at-a-glance-test--page--field-track-icon.tpl.php).) The template comments state to use $data = $row-&gt;{$field-&gt;field_alias} as the format; first, what's the difference between field and field alias? I've attached a screenshot of the taxonomy term that the field I need is attached to. The field is called field_track_icon. What is the alias? Second, do I need the curly braces?

What do I need to do to get just the data for one specific field?
Try to set the memory limit in your settings.php to something like this..

ini_set('memory_limit', '128M'); 


The above code will override your server php.ini settings. Take note that this may result instability of server and may attract suspension of your account. 

You may need to ask your hosting support if possible.