You are here

rdf-metadata.html.twig in Drupal 10

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.

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