rdf-metadata.html.twig

Same filename in this branch
  1. 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/misc/rdf-metadata.html.twig
  2. 8.9.x core/themes/seven/templates/classy/misc/rdf-metadata.html.twig
  3. 8.9.x core/themes/claro/templates/classy/misc/rdf-metadata.html.twig
  4. 8.9.x core/themes/bartik/templates/classy/misc/rdf-metadata.html.twig
  5. 8.9.x core/themes/stable/templates/misc/rdf-metadata.html.twig
  6. 8.9.x core/themes/classy/templates/misc/rdf-metadata.html.twig
Same filename in other branches
  1. 9 core/themes/stable9/templates/media-library/rdf-metadata.html.twig
  2. 9 core/themes/seven/templates/classy/misc/rdf-metadata.html.twig
  3. 9 core/themes/claro/templates/classy/misc/rdf-metadata.html.twig
  4. 9 core/themes/bartik/templates/classy/misc/rdf-metadata.html.twig
  5. 9 core/themes/stable/templates/misc/rdf-metadata.html.twig
  6. 9 core/themes/classy/templates/misc/rdf-metadata.html.twig
  7. 9 core/modules/rdf/templates/rdf-metadata.html.twig

Default theme implementation for empty spans with RDF attributes.

The XHTML+RDFa doctype allows either <span></span> or <span /> syntax to be used, but for maximum browser compatibility, W3C recommends the former when serving pages using the text/html media type, see http://www.w3.org/TR/xhtml1/#C_3.

Available variables:

  • metadata: Each item within corresponds to its own set of attributes, and therefore, needs its own 'attributes' element.

See also

template_preprocess_rdf_metadata()

3 theme calls to rdf-metadata.html.twig
rdf_preprocess_comment in core/modules/rdf/rdf.module
Implements hook_preprocess_HOOK() for comment templates.
rdf_preprocess_node in core/modules/rdf/rdf.module
Implements hook_preprocess_HOOK() for node templates.
rdf_preprocess_taxonomy_term in core/modules/rdf/rdf.module
Implements hook_preprocess_HOOK() for taxonomy term templates.

File

core/modules/rdf/templates/rdf-metadata.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for empty spans with RDF attributes.
  5. *
  6. * The XHTML+RDFa doctype allows either <span></span> or <span /> syntax to
  7. * be used, but for maximum browser compatibility, W3C recommends the
  8. * former when serving pages using the text/html media type, see
  9. * http://www.w3.org/TR/xhtml1/#C_3.
  10. *
  11. * Available variables:
  12. * - metadata: Each item within corresponds to its own set of attributes,
  13. * and therefore, needs its own 'attributes' element.
  14. *
  15. * @see template_preprocess_rdf_metadata()
  16. *
  17. * @ingroup themeable
  18. */
  19. #}
  20. {% for attributes in metadata %}
  21. <span{{ attributes.addClass('hidden') }}></span>
  22. {% endfor %}

Related topics


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