addtoany-standard.html.twig in AddToAny Share Buttons 8
Default theme implementation to standard AddToAny buttons.
Available variables:
- addtoany_html: HTML for AddToAny buttons.
- button_image: URL for universal button.
- button_setting: Setting of button.
- button_size: Size of buttons.
- universal_button_placement: Value of 'before' or 'after' to place button.
- link_url: Value of URL to share.
- link_title: Value of page title to share.
3 theme calls to addtoany-standard.html.twig
- AddToAnyBlock::build in src/
Plugin/ Block/ AddToAnyBlock.php - Builds and returns the renderable array for this block plugin.
- addtoany_entity_view in ./
addtoany.module - Implements hook_ENTITY_TYPE_view().
- NodeAddToAnyShare::render in src/
Plugin/ views/ field/ NodeAddToAnyShare.php - inheritdoc}
File
templates/addtoany-standard.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to standard AddToAny buttons.
- *
- * Available variables:
- * - addtoany_html: HTML for AddToAny buttons.
- * - button_image: URL for universal button.
- * - button_setting: Setting of button.
- * - button_size: Size of buttons.
- * - universal_button_placement: Value of 'before' or 'after' to place button.
- * - link_url: Value of URL to share.
- * - link_title: Value of page title to share.
- *
- * @ingroup themeable
- */
- #}
- {# Remove whitespace between tags for even spacing between buttons. #}
- {% spaceless %}
-
- {% if button_setting != 'none' %}
- {% set universal_button %}
- <a class="a2a_dd addtoany_share" href="https://www.addtoany.com/share#url={{ link_url|url_encode }}&title={{ link_title|url_encode }}">
- {% if button_image %}
- <img src="{{ button_image }}" alt="{{ 'Share'|t }}">
- {% endif %}
- </a>
- {% endset %}
- {% endif %}
-
- <span class="a2a_kit a2a_kit_size_{{ buttons_size }} addtoany_list" data-a2a-url="{{ link_url }}" data-a2a-title="{{ link_title }}">
- {% if universal_button_placement == 'before' %}
- {{ universal_button }}
- {% endif %}
-
- {% if addtoany_html %}
- {{ addtoany_html|raw }}
- {% endif %}
-
- {% if universal_button_placement == 'after' %}
- {{ universal_button }}
- {% endif %}
- </span>
-
- {% endspaceless %}