Skip to main content
edited title
Link
enchance
  • 2.1k
  • 5
  • 39
  • 50

Access Accessing field variables in Views 3.0

Source Link
enchance
  • 2.1k
  • 5
  • 39
  • 50

Access field variables in Views 3.0

Since the Documentation for Views 3.0 isn't out yet, does that mean that the way you access field variables is different from Views 2.0? That's because whenever I try the following code (from Views 2.0 docs: http://drupal.org/node/352970), all I get are errors:

<?php
    dsm(array_keys($fields));
        
    //ERROR message after placing it in views-view.tpl.php:
    Notice: Undefined variable: fields in include() (line 33 of D:\xampp\htdocs\foo\sites\all\themes\foofoo\views\views-view.tpl.php).
    Warning: array_keys() expects parameter 1 to be array, null given in include() (line 33 of D:\xampp\htdocs\foo\sites\all\themes\foofoo\views\views-view.tpl.php).
?>

In my modules I have Devel and Theme Developer enabled so why isnt it working? I also rescan my template files like a boss and clear my cache like a disease but still nothing.