You are here

group-content.html.twig in Open Social 8.8

Default theme implementation to display a group content entity.

Available variables:

  • group_content: The group content 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 group.delete) will result in an exception.
  • label: The title of the group content entity.
  • content: All group content 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.
  • url: Direct URL of the current group content entity.
  • attributes: HTML attributes for the containing element. The attributes.class element may contain one or more of the following classes:

    • group-content: The current template type (also known as a "theming hook").
    • group-content--[type]: The current group content type.
    • group-content--[view_mode]: The View Mode of the group content.
  • title_attributes: Same as attributes, except applied to the main title tag that appears in the template.
  • content_attributes: Same as attributes, except applied to the main content tag that appears in the template.
  • title_prefix: Additional output populated by modules, intended to be displayed in front of the main title tag that appears in the template.
  • title_suffix: Additional output populated by modules, intended to be displayed after the main title tag that appears in the template.
  • view_mode: View mode; for example, "teaser" or "full".
  • page: Flag for the full page state. Will be true if view_mode is 'full'.

File

themes/socialbase/templates/group/group-content.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a group content entity.
  5. *
  6. * Available variables:
  7. * - group_content: The group content entity with limited access to object
  8. * properties and methods. Only "getter" methods (method names starting with
  9. * "get", "has", or "is") and a few common methods such as "id" and "label"
  10. * are available. Calling other methods (such as group.delete) will result in
  11. * an exception.
  12. * - label: The title of the group content entity.
  13. * - content: All group content items. Use {{ content }} to print them all,
  14. * or print a subset such as {{ content.field_example }}. Use
  15. * {{ content|without('field_example') }} to temporarily suppress the
  16. * printing of a given child element.
  17. * - url: Direct URL of the current group content entity.
  18. * - attributes: HTML attributes for the containing element.
  19. * The attributes.class element may contain one or more of the following
  20. * classes:
  21. * - group-content: The current template type (also known as a "theming hook").
  22. * - group-content--[type]: The current group content type.
  23. * - group-content--[view_mode]: The View Mode of the group content.
  24. * - title_attributes: Same as attributes, except applied to the main title
  25. * tag that appears in the template.
  26. * - content_attributes: Same as attributes, except applied to the main
  27. * content tag that appears in the template.
  28. * - title_prefix: Additional output populated by modules, intended to be
  29. * displayed in front of the main title tag that appears in the template.
  30. * - title_suffix: Additional output populated by modules, intended to be
  31. * displayed after the main title tag that appears in the template.
  32. * - view_mode: View mode; for example, "teaser" or "full".
  33. * - page: Flag for the full page state. Will be true if view_mode is 'full'.
  34. *
  35. * @see template_preprocess_group()
  36. *
  37. * @ingroup themeable
  38. */
  39. #}
  40. <div{{ attributes }}>
  41. {{ content.entity_id }}
  42. </div>