update-version.html.twig

Same filename in this branch
  1. 9 core/themes/stable9/templates/admin/update-version.html.twig
  2. 9 core/themes/claro/templates/admin/update-version.html.twig
  3. 9 core/themes/stable/templates/admin/update-version.html.twig
Same filename in other branches
  1. 8.9.x core/themes/claro/templates/admin/update-version.html.twig
  2. 8.9.x core/themes/stable/templates/admin/update-version.html.twig
  3. 8.9.x core/modules/update/templates/update-version.html.twig
  4. 10 core/themes/stable9/templates/admin/update-version.html.twig
  5. 10 core/themes/claro/templates/admin/update-version.html.twig
  6. 10 core/modules/update/templates/update-version.html.twig
  7. 11.x core/themes/stable9/templates/admin/update-version.html.twig
  8. 11.x core/themes/claro/templates/admin/update-version.html.twig
  9. 11.x core/modules/update/templates/update-version.html.twig

Default theme implementation for the version display of a project.

Available variables:

  • attributes: HTML attributes suitable for a container element.
  • title: The title of the project.
  • core_compatibility_details: Render array of core compatibility details.
  • version: A list of data about the latest released version, containing:
    • version: The version number.
    • date: The date of the release.
    • download_link: The URL for the downloadable file.
    • release_link: The URL for the release notes.
    • core_compatible: A flag indicating whether the project is compatible with the currently installed version of Drupal core. This flag is not set for the Drupal core project itself.
    • core_compatibility_message: A message indicating the versions of Drupal core with which this project is compatible. This message is also contained within the 'core_compatibility_details' variable documented above. This message is not set for the Drupal core project itself.

See also

template_preprocess_update_version()

1 theme call to update-version.html.twig
template_preprocess_update_project_status in core/modules/update/update.report.inc
Prepares variables for update project status templates.

File

core/modules/update/templates/update-version.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for the version display of a project.
  5. *
  6. * Available variables:
  7. * - attributes: HTML attributes suitable for a container element.
  8. * - title: The title of the project.
  9. * - core_compatibility_details: Render array of core compatibility details.
  10. * - version: A list of data about the latest released version, containing:
  11. * - version: The version number.
  12. * - date: The date of the release.
  13. * - download_link: The URL for the downloadable file.
  14. * - release_link: The URL for the release notes.
  15. * - core_compatible: A flag indicating whether the project is compatible
  16. * with the currently installed version of Drupal core. This flag is not
  17. * set for the Drupal core project itself.
  18. * - core_compatibility_message: A message indicating the versions of Drupal
  19. * core with which this project is compatible. This message is also
  20. * contained within the 'core_compatibility_details' variable documented
  21. * above. This message is not set for the Drupal core project itself.
  22. *
  23. * @see template_preprocess_update_version()
  24. *
  25. * @ingroup themeable
  26. */
  27. #}
  28. <div class="{{ attributes.class }} project-update__version"{{ attributes|without('class') }}>
  29. <div class="clearfix">
  30. <div class="project-update__version-title layout-column layout-column--quarter">{{ title }}</div>
  31. <div class="project-update__version-details layout-column layout-column--quarter">
  32. <a href="{{ version.release_link }}">{{ version.version }}</a>
  33. <span class="project-update__version-date">({{ version.date|date('Y-M-d') }})</span>
  34. </div>
  35. <div class="layout-column layout-column--half">
  36. <ul class="project-update__version-links">
  37. <li class="project-update__release-notes-link">
  38. <a href="{{ version.release_link }}">{{ 'Release notes'|t }}</a>
  39. </li>
  40. {% if core_compatibility_details %}
  41. <li class="project-update__compatibility-details">
  42. {{ core_compatibility_details }}
  43. </li>
  44. {% endif %}
  45. </ul>
  46. </div>
  47. </div>
  48. </div>

Related topics


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