{{ $years := .Pages }} {{ with $years.ByTitle.Reverse }}

{{ i18n "events.archives.by_year" }}

    {{ range . }} {{ if .Params.is_year }}
  1. {{ .Title }} {{ $count := len (where .RegularPagesRecursive ".Params.is_month" nil) }}

    {{ i18n "events.count" $count }}

  2. {{ end }} {{ end }}
{{ end }}