You are here

eck-entity.html.twig in Entity Construction Kit (ECK) 8

Default theme implementation to display an ECK entity.

Available variables:

  • eck_entity: The full ECK entity with limited access to object properties and methods. Only "getter" methods (method names starting with "get", "has", or "is") and a few common methods such as "id" and "label" are available. Calling other methods (such as node.delete) will result in an exception.
  • content: All ECK entity items. Use {{ content }} to print them all, or print a subset such as {{ content.field_example }}. Use {{ content|without('field_example') }} to temporarily suppress the printing of a given child element.
  • attributes: HTML attributes for the containing element.
  • view_mode: View mode; for example, "teaser" or "full".

File

templates/eck-entity.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display an ECK entity.
  5. *
  6. * Available variables:
  7. * - eck_entity: The full ECK entity with limited access to object properties
  8. * and methods. Only "getter" methods (method names starting with "get",
  9. * "has", or "is") and a few common methods such as "id" and "label" are
  10. * available. Calling other methods (such as node.delete) will result in an
  11. * exception.
  12. * - content: All ECK entity items. Use {{ content }} to print them all,
  13. * or print a subset such as {{ content.field_example }}. Use
  14. * {{ content|without('field_example') }} to temporarily suppress the printing
  15. * of a given child element.
  16. * - attributes: HTML attributes for the containing element.
  17. * - view_mode: View mode; for example, "teaser" or "full".
  18. *
  19. * @see template_preprocess_eck_entity()
  20. *
  21. * @ingroup themeable
  22. */
  23. #}
  24. {%
  25. set classes = [
  26. 'eck-entity',
  27. ]
  28. %}
  29. <div{{ attributes.addClass(classes) }}>
  30. {{ content }}
  31. </div>