subscription.html.twig in Mailing List 8
Default theme implementation to display a subscription.
Available variables:
- subscription: The subscription entity with limited access to object properties and methods. Only method names starting with "get", "has", or "is" and a few common methods such as "id", "label", and "bundle" are available.
- label: The title of the subscription.
- email: The email address of the subscription.
- content: All subscription 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.
- metadata: Metadata for this node.
- date: Themed creation date field.
- author_name: Themed author name field.
- url: Direct URL of the current node.
- attributes: HTML attributes for the containing element.
The attributes.class element may contain one or more of the following
classes:
- subscription: The current template type (also known as a "theming hook").
- subscription--list-[mailing_list]: The mailing list which this subscription belongs.
- subscription--view-mode-[view_mode]: The View Mode.
The following are controlled through the subscription status.
- subscription--active: Appears on active subscriptions.
- 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.
- author_attributes: Same as attributes, except applied to the author of the node 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".
- 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
File
templates/subscription.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display a subscription.
- *
- * Available variables:
- * - subscription: The subscription entity with limited access to object properties
- * and methods. Only method names starting with "get", "has", or "is" and a
- * few common methods such as "id", "label", and "bundle" are available.
- * - label: The title of the subscription.
- * - email: The email address of the subscription.
- * - content: All subscription 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.
- * - metadata: Metadata for this node.
- * - date: Themed creation date field.
- * - author_name: Themed author name field.
- * - url: Direct URL of the current node.
- * - attributes: HTML attributes for the containing element.
- * The attributes.class element may contain one or more of the following
- * classes:
- * - subscription: The current template type (also known as a "theming hook").
- * - subscription--list-[mailing_list]: The mailing list which this subscription belongs.
- * - subscription--view-mode-[view_mode]: The View Mode.
- * The following are controlled through the subscription status.
- * - subscription--active: Appears on active subscriptions.
- * - 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.
- * - author_attributes: Same as attributes, except applied to the author of
- * the node 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".
- * - 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 template_preprocess_subscription()
- *
- * @ingroup themeable
- */
- #}
- <section{{ attributes }}>
-
- {{ title_prefix }}
- <div>{{ email }}</div>
- {{ title_suffix }}
-
- <div{{ content_attributes }}>
- {{ content }}
- </div>
-
- </section>