paragraph--separator.html.twig

Theme override for paragraph paragrpahs_separator type.

Available variables:

  • paragraph: Full paragraph entity. Only method names starting with "get", "has", or "is" and a few common methods such as "id", "label", and "bundle" are available. For example:

    • paragraph.getCreatedTime() will return the paragraph creation timestamp.
    • paragraph.id(): The paragraph ID.
    • paragraph.bundle(): The type of the paragraph, for example, "image" or "text".
    • paragraph.getOwnerId(): The user ID of the paragraph author.

    See Drupal\paragraphs\Entity\Paragraph for a full list of public properties and methods for the paragraph object.

  • content: All paragraph 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. The attributes.class element may contain one or more of the following classes:

    • paragraphs: The current template type (also known as a "theming hook").
    • paragraphs--type-[type]: The current paragraphs type. For example, if the paragraph is an "Image" it would result in "paragraphs--type--image". Note that the machine name will often be in a short form of the human readable label.
    • paragraphs--view-mode--[view_mode]: The View Mode of the paragraph; for example, a preview would result in: "paragraphs--view-mode--preview", and default: "paragraphs--view-mode--default".
  • view_mode: View mode; for example, "preview" or "full".
  • logged_in: Flag for authenticated user status. Will be true when the current user is a logged-in member.
  • is_admin: Flag for admin user status. Will be true when the current user is an administrator.

See also

template_preprocess_paragraph()

File

paragraphs_collection/templates/paragraph--separator.html.twig
View source
  1. {% extends "@paragraphs/paragraph.html.twig" %}
  2. {#
  3. /**
  4. * @file
  5. * Theme override for paragraph paragrpahs_separator type.
  6. *
  7. * Available variables:
  8. * - paragraph: Full paragraph entity.
  9. * Only method names starting with "get", "has", or "is" and a few common
  10. * methods such as "id", "label", and "bundle" are available. For example:
  11. * - paragraph.getCreatedTime() will return the paragraph creation timestamp.
  12. * - paragraph.id(): The paragraph ID.
  13. * - paragraph.bundle(): The type of the paragraph, for example, "image" or "text".
  14. * - paragraph.getOwnerId(): The user ID of the paragraph author.
  15. * See Drupal\paragraphs\Entity\Paragraph for a full list of public properties
  16. * and methods for the paragraph object.
  17. * - content: All paragraph items. Use {{ content }} to print them all,
  18. * or print a subset such as {{ content.field_example }}. Use
  19. * {{ content|without('field_example') }} to temporarily suppress the printing
  20. * of a given child element.
  21. * - attributes: HTML attributes for the containing element.
  22. * The attributes.class element may contain one or more of the following
  23. * classes:
  24. * - paragraphs: The current template type (also known as a "theming hook").
  25. * - paragraphs--type-[type]: The current paragraphs type. For example, if the paragraph is an
  26. * "Image" it would result in "paragraphs--type--image". Note that the machine
  27. * name will often be in a short form of the human readable label.
  28. * - paragraphs--view-mode--[view_mode]: The View Mode of the paragraph; for example, a
  29. * preview would result in: "paragraphs--view-mode--preview", and
  30. * default: "paragraphs--view-mode--default".
  31. * - view_mode: View mode; for example, "preview" or "full".
  32. * - logged_in: Flag for authenticated user status. Will be true when the
  33. * current user is a logged-in member.
  34. * - is_admin: Flag for admin user status. Will be true when the current user
  35. * is an administrator.
  36. *
  37. * @see template_preprocess_paragraph()
  38. *
  39. * @ingroup themeable
  40. */
  41. #}
  42. {% block content %}<hr>{% endblock %}