forked from gohugoio/hugoDocs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
456 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: First | ||
description: Returns the first Pager object in the Pagers collection. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: | ||
- /methods/paginator/Last | ||
- /methods/paginator/Next | ||
- /methods/paginator/Prev | ||
- /methods/paginator/HasNext | ||
- /methods/paginator/HasPrev | ||
returnType: page.Pager | ||
signatures: [PAGINATOR.First] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
{{ with .First }} | ||
<a href="{{ .URL }}">First</a> | ||
{{ end }} | ||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: HasNext | ||
description: Reports whether there is a Pager object after the current Pager object. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: | ||
- /methods/paginator/First | ||
- /methods/paginator/Last | ||
- /methods/paginator/Next | ||
- /methods/paginator/Prev | ||
- /methods/paginator/HasPrev | ||
returnType: bool | ||
signatures: [PAGINATOR.HasNext] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
{{ if .HasNext }} | ||
<a href="{{ .Next.URL }}">Next</a> | ||
{{ end }} | ||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: HasPrev | ||
description: Reports whether there is a Pager object before the current Pager object. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: | ||
- /methods/paginator/First | ||
- /methods/paginator/Last | ||
- /methods/paginator/Next | ||
- /methods/paginator/Prev | ||
- /methods/paginator/HasNext | ||
returnType: bool | ||
signatures: [PAGINATOR.HasPrev] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
{{ if .HasPrev }} | ||
<a href="{{ .Prev.URL }}">Previous</a> | ||
{{ end }} | ||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: Last | ||
description: Returns the last Pager object in the Pagers collection. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: | ||
- /methods/paginator/First | ||
- /methods/paginator/Next | ||
- /methods/paginator/Prev | ||
- /methods/paginator/HasNext | ||
- /methods/paginator/HasPrev | ||
returnType: page.Pager | ||
signatures: [PAGINATOR.Last] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Last }} | ||
<a href="{{ .URL }}">Last</a> | ||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Next | ||
description: Returns the next Pager object in the Pagers collection. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: | ||
- /methods/paginator/First | ||
- /methods/paginator/Last | ||
- /methods/paginator/Prev | ||
- /methods/paginator/HasNext | ||
- /methods/paginator/HasPrev | ||
returnType: page.Pager | ||
signatures: [PAGINATOR.Next] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
{{ with .Next }} | ||
<a href="{{ .URL }}">Next</a> | ||
{{ end }} | ||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: NumberOfElements | ||
description: Returns the number of Page objects in the current Pager object. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: | ||
- /methods/paginator/TotalNumberOfElements | ||
returnType: int | ||
signatures: [PAGINATOR.NumberOfElements] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
|
||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: PageNumber | ||
description: Returns the number of the current Pager object in the collection of Pager objects. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: [] | ||
returnType: int | ||
signatures: [PAGINATOR.PageNumber] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
|
||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: PageSize | ||
description: Returns the maximum number of Page objects in each Pager object. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: [] | ||
returnType: int | ||
signatures: [PAGINATOR.PageSize] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
|
||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: Pagers | ||
description: Returns a collection of Pager objects. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: [] | ||
returnType: page.pagers | ||
signatures: [PAGINATOR.Pagers] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
|
||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: Pages | ||
description: Returns a collection of Page objects in the current Pager object. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: [] | ||
returnType: page.Pages | ||
signatures: [PAGINATOR.Pages] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
|
||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Prev | ||
description: Returns the previous Pager object in the Pagers collection. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: | ||
- /methods/paginator/First | ||
- /methods/paginator/Last | ||
- /methods/paginator/Next | ||
- /methods/paginator/HasNext | ||
- /methods/paginator/HasPrev | ||
returnType: page.Pager | ||
signatures: [PAGINATOR.Prev] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
{{ with .Prev }} | ||
<a href="{{ .URL }}">Previous</a> | ||
{{ end }} | ||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: TotalNumberOfElements | ||
description: Returns the number of Page objects in all Pager objects. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: | ||
- /methods/paginator/NumberOfElements | ||
returnType: int | ||
signatures: [PAGINATOR.TotalNumberOfElements] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
|
||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: TotalPages | ||
description: Returns the number of Pager objects. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: [] | ||
returnType: int | ||
signatures: [PAGINATOR.TotalPages] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
|
||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: URL | ||
description: Returns the relative URL of the current Pager object. | ||
categories: [] | ||
keywords: [] | ||
action: | ||
related: [] | ||
returnType: string | ||
signatures: [PAGINATOR.URL] | ||
--- | ||
|
||
|
||
|
||
{{< code file=layouts/partials/pagination.html >}} | ||
{{ with .Paginator}} | ||
|
||
{{ end }} | ||
{{< /code >}} | ||
|
||
{{% include "methods/paginator/_common/pagination-template.md" %}} | ||
|
||
[pager]: /getting-started/glossary/#pager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
cascade: | ||
_build: | ||
list: never | ||
publishResources: false | ||
render: never | ||
--- | ||
|
||
<!-- | ||
Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required. | ||
Include the rendered content using the "include" shortcode. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
# Do not remove front matter. | ||
--- | ||
|
||
See Hugo's [embedded pagination template] for a complete example of using this and other `Paginator` methods. | ||
|
||
[embedded pagination template]: {{% eturl pagination %}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: Paginator methods | ||
linkTitle: Paginator | ||
description: Use these methods with a Paginator object. | ||
categories: [] | ||
keywords: [] | ||
menu: | ||
docs: | ||
parent: methods | ||
--- | ||
|
||
Use these methods with a Paginator object. |
Oops, something went wrong.