You are here

views-delimited-list-fields.html.twig in Views Delimited List 2.x

views-delimited-list-fields.tpl.php Default simple view template to all the fields as a row. This template overrides the original template from Views to output no extra whitespace.

Available variables:

  • view: The view in use.
  • fields: an array of $field objects. Each one contains:
    • field.content: The output of the field.
    • field.raw: The raw data for the field, if it exists. This is NOT output safe.
    • field.class: The safe class id to use.
    • field.handler: The Views field handler object controlling this field. Do not use var_export to dump this object, as it can't handle the recursion.
    • field.inline: Whether or not the field should be inline.
    • field.inline_html: either div or span based on the above flag.
    • field.wrapper_prefix: A complete wrapper containing the inline_html to use.
    • field.wrapper_suffix: The closing tag for the wrapper.
    • field.separator: an optional separator that may appear before a field.
    • field.label: The wrap label text to use.
    • field.label_html: The full HTML of the label to use including configured element type.
  • $row: The raw result object from the query, with all data it fetched.

File

templates/views-delimited-list-fields.html.twig
View source
  1. {#
  2. /**
  3. * @file views-delimited-list-fields.tpl.php
  4. * Default simple view template to all the fields as a row. This template overrides
  5. * the original template from Views to output no extra whitespace.
  6. *
  7. * Available variables:
  8. * - view: The view in use.
  9. * - fields: an array of $field objects. Each one contains:
  10. * - field.content: The output of the field.
  11. * - field.raw: The raw data for the field, if it exists. This is NOT output safe.
  12. * - field.class: The safe class id to use.
  13. * - field.handler: The Views field handler object controlling this field. Do not use
  14. * var_export to dump this object, as it can't handle the recursion.
  15. * - field.inline: Whether or not the field should be inline.
  16. * - field.inline_html: either div or span based on the above flag.
  17. * - field.wrapper_prefix: A complete wrapper containing the inline_html to use.
  18. * - field.wrapper_suffix: The closing tag for the wrapper.
  19. * - field.separator: an optional separator that may appear before a field.
  20. * - field.label: The wrap label text to use.
  21. * - field.label_html: The full HTML of the label to use including configured element type.
  22. * - $row: The raw result object from the query, with all data it fetched.
  23. *
  24. * @ingroup views_templates
  25. */
  26. #}
  27. {% for id, field in fields %}
  28. {% if field.separator %}
  29. {{ field.separator }}
  30. {% endif %}
  31. {{ field.wrapper_prefix }}
  32. {{ field.label_html }}
  33. {{ field.content }}
  34. {{ field.wrapper_suffix }}
  35. {% endfor %}