entity_generic-8.x-3.x-dev/templates/entity-generic.html.twig

templates/entity-generic.html.twig
{#
/**
 * @file
 * Default theme implementation to display generic entity.
 *
 * Available variables:
 * - entity_generic: The 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 entity.delete) will result in an exception.
 * - label: The name or label of the entity.
 * - content: All 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.
 * - 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'.
 * - 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_generic()
 *
 * @ingroup themeable
 */
#}

{%
  set classes = [
    'entity-generic',
  ]
%}

<article{{ attributes }}>

  {% if label %}
    {{ title_prefix }}
    {% if page %}
      <h2{{ title_attributes }}>
        {{ label }}
      </h2>
    {% endif %}
    {{ title_suffix }}
  {% endif %}

  <div{{ content_attributes }}>
    {{ content }}
  </div>

</article>


Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc