You are here

calendar-datebox.html.twig in Calendar 8

Template to display the date box in a calendar.

Available variables:

  • view: The view.
  • granularity: The type of calendar this box is in -- year, month, day, or week.
  • mini: Whether or not this is a mini calendar.
  • class: The class for this box -- mini-on, mini-off, or day.
  • day: The day of the month.
  • date: The current date, in the form YYYY-MM-DD.
  • link: A formatted link to the calendar day view for this day.
  • url: The url to the calendar day view for this day.
  • selected: Whether or not this day has any items.
  • items: An array of items for this day.

File

templates/calendar-datebox.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Template to display the date box in a calendar.
  5. *
  6. * Available variables:
  7. * - view: The view.
  8. * - granularity: The type of calendar this box is in -- year, month, day, or week.
  9. * - mini: Whether or not this is a mini calendar.
  10. * - class: The class for this box -- mini-on, mini-off, or day.
  11. * - day: The day of the month.
  12. * - date: The current date, in the form YYYY-MM-DD.
  13. * - link: A formatted link to the calendar day view for this day.
  14. * - url: The url to the calendar day view for this day.
  15. * - selected: Whether or not this day has any items.
  16. * - items: An array of items for this day.
  17. *
  18. * @ingroup themeable
  19. */
  20. #}
  21. <div class="{{ granularity }} {{ class }}">
  22. {% if selected is not empty %}
  23. {{ link }}
  24. {% else %}
  25. {{ day }}
  26. {% endif %}
  27. </div>