You are here

recipe-duration.html.twig in Recipe 8.2

Theme for recipe duration markup.

Available variables:

  • hours: The amount of hours in the time duration.
  • minutes: The amount of minutes in the time duration.

File

templates/recipe-duration.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme for recipe duration markup.
  5. *
  6. * Available variables:
  7. * - hours: The amount of hours in the time duration.
  8. * - minutes: The amount of minutes in the time duration.
  9. *
  10. * @see template_preprocess_recipe_duration()
  11. */
  12. #}
  13. {% if hours and minutes %}
  14. {{ hours }}, {{ minutes }}
  15. {% elseif hours %}
  16. {{ hours }}
  17. {% else %}
  18. {{ minutes }}
  19. {% endif %}