From 33ffda72258c06516f288c4418cd4d5adc153847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 16 Jul 2015 13:17:54 +0200 Subject: [PATCH] Add paginator support for page groups Fixed #1274 --- content/extras/pagination.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/content/extras/pagination.md b/content/extras/pagination.md index da7cc38c7..7701a9a92 100644 --- a/content/extras/pagination.md +++ b/content/extras/pagination.md @@ -35,12 +35,17 @@ There are two ways to configure and use a `.Paginator`: For a given **Node**, it's one of the options above. The `.Paginator` is static and cannot change once created. - The global page size setting (`Paginate`) can be overridden by providing a positive integer as the last argument. The examples below will give five items per page: * `{{ range (.Paginator 5).Pages }}` * `{{ $paginator := .Paginate (where .Data.Pages "Type" "post") 5 }}` +It is also possible to use the `GroupBy` functions in combination with pagination: + +``` +{{ range (.Paginate (.Data.Pages.GroupByDate "2006")).PageGroups }} +``` + ## Build the navigation The `.Paginator` contains enough information to build a paginator interface.