Skip to content

Commit

Permalink
Add Paginator methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed Feb 12, 2024
1 parent 94f2a36 commit 954459d
Show file tree
Hide file tree
Showing 20 changed files with 446 additions and 42 deletions.
27 changes: 27 additions & 0 deletions content/en/methods/paginator/First.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
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}}

{{ end }}
{{< /code >}}

{{% include "methods/paginator/_common/pagination-template.md" %}}

[pager]: /getting-started/glossary/#pager
27 changes: 27 additions & 0 deletions content/en/methods/paginator/HasNext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
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}}

{{ end }}
{{< /code >}}

{{% include "methods/paginator/_common/pagination-template.md" %}}

[pager]: /getting-started/glossary/#pager
27 changes: 27 additions & 0 deletions content/en/methods/paginator/HasPrev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
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}}

{{ end }}
{{< /code >}}

{{% include "methods/paginator/_common/pagination-template.md" %}}

[pager]: /getting-started/glossary/#pager
27 changes: 27 additions & 0 deletions content/en/methods/paginator/Last.md
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 .Paginator}}

{{ end }}
{{< /code >}}

{{% include "methods/paginator/_common/pagination-template.md" %}}

[pager]: /getting-started/glossary/#pager
27 changes: 27 additions & 0 deletions content/en/methods/paginator/Next.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
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}}

{{ end }}
{{< /code >}}

{{% include "methods/paginator/_common/pagination-template.md" %}}

[pager]: /getting-started/glossary/#pager
23 changes: 23 additions & 0 deletions content/en/methods/paginator/NumberOfElements.md
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
22 changes: 22 additions & 0 deletions content/en/methods/paginator/PageNumber.md
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
22 changes: 22 additions & 0 deletions content/en/methods/paginator/PageSize.md
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
22 changes: 22 additions & 0 deletions content/en/methods/paginator/Pagers.md
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
22 changes: 22 additions & 0 deletions content/en/methods/paginator/Pages.md
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
27 changes: 27 additions & 0 deletions content/en/methods/paginator/Prev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
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}}

{{ end }}
{{< /code >}}

{{% include "methods/paginator/_common/pagination-template.md" %}}

[pager]: /getting-started/glossary/#pager
23 changes: 23 additions & 0 deletions content/en/methods/paginator/TotalNumberOfElements.md
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
22 changes: 22 additions & 0 deletions content/en/methods/paginator/TotalPages.md
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
22 changes: 22 additions & 0 deletions content/en/methods/paginator/URL.md
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
13 changes: 13 additions & 0 deletions content/en/methods/paginator/_common/_index.md
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.
-->
7 changes: 7 additions & 0 deletions content/en/methods/paginator/_common/pagination-template.md
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 an example of using this and other `Paginator` methods.

[embedded pagination template]: {{% eturl pagination %}}
12 changes: 12 additions & 0 deletions content/en/methods/paginator/_index.md
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.
Loading

0 comments on commit 954459d

Please sign in to comment.