You are here

amp-social-share.html.twig in Accelerated Mobile Pages (AMP) 8.3

Template for an amp-social-share block.

Available variables:

  • providers: The providers to share with.
  • app_id: Facebook app id.

See also

template_preprocess_amp_social_share()

File

templates/amp-social-share.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Template for an amp-social-share block.
  5. *
  6. * Available variables:
  7. * - providers: The providers to share with.
  8. * - app_id: Facebook app id.
  9. *
  10. * @see template_preprocess_amp_social_share()
  11. */
  12. #}
  13. {% for provider in providers %}
  14. <amp-social-share type="{{ provider }}"
  15. {% if provider == 'facebook' %}
  16. data-param-app_id="{{ app_id }}"
  17. {% endif %}
  18. ></amp-social-share>
  19. {% endfor %}