username.html.twig 812 B

12345678910111213141516171819202122232425
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for displaying a username.
  5. *
  6. * Available variables:
  7. * - account: The full account information for the user.
  8. * - name: The user's name, sanitized.
  9. * - extra: Additional text to append to the user's name, sanitized.
  10. * - link_path: The path or URL of the user's profile page, home page,
  11. * or other desired page to link to for more information about the user.
  12. * - link_options: Options to set on the \Drupal\Core\Url object if linking the
  13. * user's name to the user's page.
  14. * - attributes: HTML attributes for the containing element.
  15. *
  16. * @see template_preprocess_username()
  17. *
  18. * @ingroup themeable
  19. */
  20. #}
  21. {% if link_path -%}
  22. <a{{ attributes }}>{{ name }}{{ extra }}</a>
  23. {%- else -%}
  24. <span{{ attributes }}>{{ name }}{{ extra }}</span>
  25. {%- endif -%}