You are here

sharemessage-addthis.html.twig in Share Message 8

Default theme implementation to display a Share Message - AddThis.

Available variables:

  • services: Enabled Share Message services to be displayed.
  • javascripts: A list of additional javascripts to be loaded.
  • additional_services: A flag indicating additional services.
  • counter: Total numbeer of shareable links.

File

templates/sharemessage-addthis.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a Share Message - AddThis.
  5. *
  6. * Available variables:
  7. * - services: Enabled Share Message services to be displayed.
  8. * - javascripts: A list of additional javascripts to be loaded.
  9. * - additional_services: A flag indicating additional services.
  10. * - counter: Total numbeer of shareable links.
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. <div{{ attributes }}>
  16. {% if services %}
  17. {% for service in services %}
  18. {% if service == 'twitter' %}
  19. {% block javascripts %}
  20. <script>
  21. var addthis_share = { templates: { twitter: "{{ twitter_template }}" } }
  22. </script>
  23. {% endblock %}
  24. {% endif %}
  25. <a class="addthis_button_{{ service }}"></a>
  26. {% endfor %}
  27. {% else %}
  28. <a class="addthis_button_preferred_1"></a>
  29. <a class="addthis_button_preferred_2"></a>
  30. <a class="addthis_button_preferred_3"></a>
  31. <a class="addthis_button_preferred_4"></a>
  32. <a class="addthis_button_preferred_5"></a>
  33. {% endif %}
  34. {% if additional_services %}
  35. <a class="addthis_button_compact"></a>
  36. {% endif %}
  37. {% if counter %}
  38. <a class="addthis_counter {{ counter }}"></a>
  39. {% endif %}
  40. </div>