You are here

commerce-promotion.html.twig in Commerce Core 8.2

Default template for promotions.

Available variables:

  • attributes: HTML attributes for the wrapper.
  • promotion: The rendered promotion fields. Use 'promotion' to print them all, or print a subset such as 'promotion.name'. Use the following code to exclude the printing of a given field:

  {{ promotion|without('name') }}
  
  • promotion_entity: The promotion entity.
  • promotion_url: The promotion URL.

File

modules/promotion/templates/commerce-promotion.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. *
  5. * Default template for promotions.
  6. *
  7. * Available variables:
  8. * - attributes: HTML attributes for the wrapper.
  9. * - promotion: The rendered promotion fields.
  10. * Use 'promotion' to print them all, or print a subset such as
  11. * 'promotion.name'. Use the following code to exclude the
  12. * printing of a given field:
  13. * @code
  14. * {{ promotion|without('name') }}
  15. * @endcode
  16. * - promotion_entity: The promotion entity.
  17. * - promotion_url: The promotion URL.
  18. *
  19. * @ingroup themeable
  20. */
  21. #}
  22. <article{{ attributes }}>
  23. {{ promotion }}
  24. </article>