W3cubDocs

/Drupal 8

views-view-field.html.twig

Default theme implementation for a single field in a view.

Available variables:

  • view: The view that the field belongs to.
  • field: The field handler that can process the input.
  • row: The raw result of the database query that generated this field.
  • 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.

See also

template_preprocess_views_view_field()

File

core/modules/views/templates/views-view-field.html.twig

Related topics

Theme system overview
Functions and templates for the user interface that themes can override.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!views!templates!views-view-field.html.twig/8.1.x