addtocal-links.html.twig in Add to Cal 8.2
Default theme implementation for addtocal_links.
Available variables:
- attributes: An associative array of element attributes.
- button_text: The addtocal button text.
- button_attributes: An associative array of button attributes.
- menu_attributes: An associative array of menu attributes.
- items: List of add to cal links.
See also
1 theme call to addtocal-links.html.twig
- AddtocalView::viewElements in src/
Plugin/ Field/ FieldFormatter/ AddtocalView.php - Builds a renderable array for a field value.
File
templates/addtocal-links.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation for addtocal_links.
- *
- * Available variables:
- * - attributes: An associative array of element attributes.
- * - button_text: The addtocal button text.
- * - button_attributes: An associative array of button attributes.
- * - menu_attributes: An associative array of menu attributes.
- * - items: List of add to cal links.
- *
- * @see template_preprocess_addtocal_links()
- *
- * @ingroup themeable
- */
- #}
- <div{{ attributes }}>
- <button{{ button_attributes }}>{{ button_text }}</button>
- <div{{ menu_attributes }}>
- <ul class="addtocal-links">
- {% for type, item in items %}
- <li class="addtocal-link" data-addtocal-type="{{ type }}">
- <a href="{{ item.url }}" target="_blank" rel="noopener" aria-label="{{ item['aria-label'] }}">{{ item.title }}</a>
- </li>
- {% endfor %}
- </ul>
- </div>
- </div>