Pagination - first 50

Hi,

I use this paginate function

{{ range (.Paginate ( where .Site.RegularPages "Section" "in" (slice "builds" "writing")).ByDate.Reverse).Pages }}

and i see it displays only 10 results, which is the default, i would like to increase it, and i saw here:

that you can use an argument like in this example:

{{ range (.Paginate ( first 50 .Pages.ByTitle )).Pages }}

i’m not sure where to insert the “first 50” in my function, i tried but always get errors, any hints how to do it?

Do you want to display 50 pages per pager, or 50 pages in total (with 10 per per pager)?

50 pages per pager i think

If you want to display 50 pages per pager, you can either:

a. Set paginate = 50 in your site configuration, OR
b. Provide a second argument to the .Paginate method

{{ range (.Paginate (where .Site.RegularPages "Section" "in" (slice "builds" "writing")).ByDate.Reverse 50).Pages }}

thanks a lot, worked perfectly!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.