views-view-field.tpl.php

  1. cis7 sites/all/modules/ulmus/views/theme/views-view-field.tpl.php
  2. cle7 sites/all/modules/ulmus/views/theme/views-view-field.tpl.php
  3. ecd7 sites/all/modules/ulmus/views/theme/views-view-field.tpl.php
  4. elmsmedia7 sites/all/modules/ulmus/views/theme/views-view-field.tpl.php
  5. harmony7 sites/all/modules/ulmus/views/theme/views-view-field.tpl.php
  6. icor7 sites/all/modules/ulmus/views/theme/views-view-field.tpl.php
  7. meedjum_blog7 sites/all/modules/ulmus/views/theme/views-view-field.tpl.php
  8. mooc7 sites/all/modules/ulmus/views/theme/views-view-field.tpl.php

This template is used to print a single field in a view.

It is not actually used in default Views, as this is registered as a theme function which has better performance. For single overrides, the template is perfectly okay.

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.

When fetching output from the $row, this construct should be used: $data = $row->{$field->field_alias}

The above will guarantee that you'll always get the correct data, regardless of any changes in the aliasing that might happen if the view is modified.

3 string references to the theme hook from views-view-field.tpl.php

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

views_handler_field::theme_functions in sites/all/modules/ulmus/views/handlers/views_handler_field.inc
views_theme in sites/all/modules/ulmus/views/views.module
Implement hook_theme(). Register views theming functions.
views_theme in sites/all/modules/ulmus/views/views.module
Implement hook_theme(). Register views theming functions.

File

sites/all/modules/ulmus/views/theme/views-view-field.tpl.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * This template is used to print a single field in a view.
  5. *
  6. * It is not actually used in default Views, as this is registered as a theme
  7. * function which has better performance. For single overrides, the template is
  8. * perfectly okay.
  9. *
  10. * Variables available:
  11. * - $view: The view object
  12. * - $field: The field handler object that can process the input
  13. * - $row: The raw SQL result that can be used
  14. * - $output: The processed output that will normally be used.
  15. *
  16. * When fetching output from the $row, this construct should be used:
  17. * $data = $row->{$field->field_alias}
  18. *
  19. * The above will guarantee that you'll always get the correct data,
  20. * regardless of any changes in the aliasing that might happen if
  21. * the view is modified.
  22. */
  23. ?>
  24. <?php print $output; ?>