commerce-add-to-wishlist-link.html.twig in Commerce Add To Cart Link 2.x
Same filename and directory in other branches
Default template for add to cart link.
Available variables:
- attributes: HTML attributes for the wrapper.
- url: The URL to the add to cart route.
- product_variation: The product variation entity.
1 theme call to commerce-add-to-wishlist-link.html.twig
- AddToWishlistLink::build in modules/
wishlist/ src/ AddToWishlistLink.php - Generate a render array for an add-to-wishlist link.
File
modules/wishlist/templates/commerce-add-to-wishlist-link.html.twigView source
- {#
- /**
- * @file
- *
- * Default template for add to cart link.
- *
- * Available variables:
- * - attributes: HTML attributes for the wrapper.
- * - url: The URL to the add to cart route.
- * - product_variation: The product variation entity.
- *
- * @ingroup themeable
- */
- #}
- <div{{ attributes }}>
- <a href="{{ url }}" class="add-to-wishlist-link" rel="nofollow" data-variation="{{ product_variation.id }}">{{ 'Add to wishlist'|t }}</a>
- </div>