recipe-view-plain-text.html.twig in Recipe 8.2
A view template to display all the fields in a plain-text recipe.
Available variables:
- view: The view in use.
- recipes: The list of rows returned by the query. Each recipe contains the
following keys:
- fields: A list of fields, each one contains:
- content: The output of the field.
- raw: The raw data for the field, if it exists. This is NOT output safe.
- handler: The Views field handler controlling this field.
- label: The field's label text.
- label_suffix: Colon after the label.
- has_label_colon: A boolean indicating whether to display a colon after the label.
- fields: A list of fields, each one contains:
- row_separator: Text used to separate multiple recipes.
See also
File
templates/recipe-view-plain-text.html.twigView source
- {#
- /**
- * @file
- * A view template to display all the fields in a plain-text recipe.
- *
- * Available variables:
- * - view: The view in use.
- * - recipes: The list of rows returned by the query. Each recipe contains the
- * following keys:
- * - fields: A list of fields, each one contains:
- * - content: The output of the field.
- * - raw: The raw data for the field, if it exists. This is NOT output safe.
- * - handler: The Views field handler controlling this field.
- * - label: The field's label text.
- * - label_suffix: Colon after the label.
- * - has_label_colon: A boolean indicating whether to display a colon after
- * the label.
- * - row_separator: Text used to separate multiple recipes.
- *
- * @see template_preprocess_views_view_fields()
- *
- * @ingroup themeable
- */
- #}
- {% for recipe in recipes %}
- {% for field in recipe.fields %}
- {% if field.label %}
- {{ field.label }}{{ field.label_suffix }}
- {% endif %}
- {{ field.content }}
-
- {% endfor %}
- {% if not loop.last %}{{ row_separator }}{% endif %}
- {% endfor %}