block--user-login-block.html.twig

Theme override for the user login block.

Renders the login form and password reset link without a list wrapper.

File

core/themes/claro/templates/classy/block/block--user-login-block.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for the user login block.
  5. *
  6. * Renders the login form and password reset link without a list wrapper.
  7. */
  8. #}
  9. {%
  10. set classes = [
  11. 'block',
  12. 'block-' ~ configuration.provider|clean_class,
  13. 'block-' ~ plugin_id|clean_class,
  14. ]
  15. %}
  16. <div{{ attributes.addClass(classes) }}>
  17. {{ title_prefix }}
  18. {% if label %}
  19. <h2{{ title_attributes }}>{{ label }}</h2>
  20. {% endif %}
  21. {{ title_suffix }}
  22. {% block content %}
  23. {{ content.user_login_form }}
  24. {% if content.user_links['#items'] %}
  25. {% for item in content.user_links['#items'] %}
  26. {{ item }}
  27. {% endfor %}
  28. {% endif %}
  29. {% endblock %}
  30. </div>

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.