Iterate N items excluding first from Pages in template

How I can generate the list of articles, from 2nd to 5th.

Here is what I tried -

{{ range first 4 (where .Data.Pages "Section" "article") }}
    {{ range after 1 . }}
        {{ printf "%+v" . }}
        {{ $article := . }}
        {{ $article.Content }}
    {{ end }}
{{ end }}

But its throwing error - ERROR: 2016/03/18 Error while rendering homepage: template: index.html:65:25: executing “index.html” at <after 1 .>: error calling after: can’t iterate over *hugolib.Page

I posted this on google groups and later found a topic about this new discussion forum. So posting it here again.

Something like this:

{{ range after 1 (first 5 (where .Data.Pages "Section" "article")) }}
3 Likes

and it worked. Thank you @bep

God, I hate go templating :imp: