Fix for Views 2 get all field names

  1. // Put this inside a views-view-fields--VIEWNAME.tpl.php file to show the names of all the fields. Remember to set your view's row style to fields.
  2. $field_keys = array();
  3.  
  4. foreach ($fields as $key => $value) {
  5.         $field_keys[] = $key;
  6. }
  7.  
  8. print '<pre>' . print_r($field_keys, TRUE) . '</pre>';

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.