Rather than using Views PHP to insert logic in a views field, a highly advised alternative is to write a custom field handler. The following code provides the skeleton for a basic Views field handler.
example.module
Code Block | ||||
---|---|---|---|---|
| ||||
/** * Implements hook_views_api */ function example_views_api() { return array( 'api' => 3, 'path' => drupal_get_path('module', 'example'), ); } |
...