hi! i want to display month name before a sequence of the posts in this month, but so far i only have achieved this.
anyone can help me?
thanks
{% set events = page
.collection({'items':{'@taxonomy.type':'course'}})
.dateRange(datetools.startOfWeek, datetools.endOfYear)
.order('date', 'asc') %}
{% for event in events %}
{% set day = event.date|date('d') %}
{% set month = 'MONTHS_OF_THE_YEAR'|ta(event.date|date('n') - 1) %}
{% set time = event.date|date('G:i') %}
{% set dayEnd = event.header.end|date('d') %}
{% set monthEnd = 'MONTHS_OF_THE_YEAR'|ta(event.header.end|date('n') - 1) %}
{% set timeEnd = event.header.end|date('G:i') %}
<h3>{{ month }}</h3>
<li>
{{ day }} of {{ month }} - {{ time }}
{% if event.header.end %}
until {{ dayEnd }} of {{ monthEnd }} - {{ timeEnd }}
{% endif %}
<a href="{{ event.url }}">{{ event.title }}</a>
</li>
{% endfor %}
</ul>