Calendar Documentation

Learn the basics, and get to know Calendar inside and out.

Calendar 1.x Docs

calendar.calendar function

The calendar.calendar template function fetches a single calendar by its unique ID.

Parameters #

  • id #
    • The unique calendar ID
  • name #
    • The name of the calendar
  • handle #
    • The handle for the calendar
  • color #
    • a hex value of the color, e.g - #FFFFFF

Usage in Templates #

{% set calendar = craft.calendar.calendar({
    handle: "holidays"
}) %}

{% if calendar %}
    <div style="color: {{ calendar.color }};">
        {{ calendar.name }}
    </div>
{% endif %}