Hi guys
What’s wrong about this “first” ?
{{ range first 6 .Site.RegularPages.Params.url ( where .Site.RegularPages "Params.mainpage" true ) }}
it says:
wrong number of args for first: want 2 got 3
Hi guys
What’s wrong about this “first” ?
{{ range first 6 .Site.RegularPages.Params.url ( where .Site.RegularPages "Params.mainpage" true ) }}
it says:
wrong number of args for first: want 2 got 3
It’s always good to have more brackets.
{{ range first HOWMANY FROMWHAT }}
{{ range first 6 (.Site.RegularPages.Params.url ( where .Site.RegularPages "Params.mainpage" true )) }}
I am not sure if the brackets around the where clause are required. probably not. This part of the documentation has an example of first
combined with range
:
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.