You are here

commerce-product.html.twig in Commerce Core 8.2

Default product template.

Available variables:

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

  {{ product|without('title') }}
  
  • product_entity: The product entity.
  • product_url: The product URL.

File

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