I am getting all entries from a section like this:
// get the parent entry.
{% set author = craft.entries.section('mySection').authorId(currentUser.id).first() %}
// get the child entries from the parent.
{% set entires = craft.entries({
'section': 'mySection',
'level': 2,
'descendantOf': author.id
})%}
// myDate is a dateTime filed (yyyy-mm-dd)
{% for year, entry in entries|group('myDate') %}
<h4>{{ year|date('Y') }}</h4>
<ul>
{% for entry in entries %}
{% if attempt.myDate|date('Y') == year|date('Y') %}
<li>{{ entry.myDate }} > {{ entry.type.name }} - {{ entry.foo }}</li>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
What I have is close, however, it's outputting multiple years. For example,
2016
[entry]
2016
[entry]
2015
[entry]
...
I'm trying to group all of the child entries by year. For example, if I have 3 entires with the same year (2016) I am trying to show:
2016
[entry]
[entry]
[entry]
2015
[entry]
2014
[entry]
[entry]
...
Thank you for any suggestions!