field--node--created.html.twig

Same filename in this branch
  1. 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/field/field--node--created.html.twig
  2. 8.9.x core/themes/seven/templates/classy/field/field--node--created.html.twig
  3. 8.9.x core/themes/bartik/templates/classy/field/field--node--created.html.twig
  4. 8.9.x core/themes/stable/templates/field/field--node--created.html.twig
  5. 8.9.x core/themes/classy/templates/field/field--node--created.html.twig
  6. 8.9.x core/modules/node/templates/field--node--created.html.twig
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/templates/classy/field/field--node--created.html.twig
  2. 9 core/themes/stable9/templates/field/field--node--created.html.twig
  3. 9 core/themes/seven/templates/classy/field/field--node--created.html.twig
  4. 9 core/themes/claro/templates/classy/field/field--node--created.html.twig
  5. 9 core/themes/bartik/templates/classy/field/field--node--created.html.twig
  6. 9 core/themes/stable/templates/field/field--node--created.html.twig
  7. 9 core/themes/starterkit_theme/templates/field/field--node--created.html.twig
  8. 9 core/themes/classy/templates/field/field--node--created.html.twig
  9. 9 core/modules/node/templates/field--node--created.html.twig
  10. 10 core/profiles/demo_umami/themes/umami/templates/classy/field/field--node--created.html.twig
  11. 10 core/themes/stable9/templates/field/field--node--created.html.twig
  12. 10 core/themes/claro/templates/classy/field/field--node--created.html.twig
  13. 10 core/themes/starterkit_theme/templates/field/field--node--created.html.twig
  14. 10 core/modules/node/templates/field--node--created.html.twig
  15. 11.x core/profiles/demo_umami/themes/umami/templates/classy/field/field--node--created.html.twig
  16. 11.x core/themes/stable9/templates/field/field--node--created.html.twig
  17. 11.x core/themes/claro/templates/classy/field/field--node--created.html.twig
  18. 11.x core/themes/starterkit_theme/templates/field/field--node--created.html.twig
  19. 11.x core/modules/node/templates/field--node--created.html.twig

Theme override for the node created field.

This is an override of field.html.twig for the node created field. See that template for documentation about its details and overrides.

Available variables:

  • attributes: HTML attributes for the containing span element.
  • items: List of all the field items. Each item contains:
    • attributes: List of HTML attributes for each item.
    • content: The field item content.
  • entity_type: The entity type to which the field belongs.
  • field_name: The name of the field.
  • field_type: The type of the field.
  • label_display: The display settings for the label.

See also

field.html.twig

File

core/themes/claro/templates/classy/field/field--node--created.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for the node created field.
  5. *
  6. * This is an override of field.html.twig for the node created field. See that
  7. * template for documentation about its details and overrides.
  8. *
  9. * Available variables:
  10. * - attributes: HTML attributes for the containing span element.
  11. * - items: List of all the field items. Each item contains:
  12. * - attributes: List of HTML attributes for each item.
  13. * - content: The field item content.
  14. * - entity_type: The entity type to which the field belongs.
  15. * - field_name: The name of the field.
  16. * - field_type: The type of the field.
  17. * - label_display: The display settings for the label.
  18. *
  19. * @see field.html.twig
  20. */
  21. #}
  22. {%
  23. set classes = [
  24. 'field',
  25. 'field--name-' ~ field_name|clean_class,
  26. 'field--type-' ~ field_type|clean_class,
  27. 'field--label-' ~ label_display,
  28. ]
  29. %}
  30. <span{{ attributes.addClass(classes) }}>
  31. {%- for item in items -%}
  32. {{ item.content }}
  33. {%- endfor -%}
  34. </span>

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.