Skip to content

Commit 552dc9e

Browse files
committed
docs: move some descriptions in note
1 parent b98529c commit 552dc9e

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

user_guide_src/source/libraries/pagination.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,6 @@ hasPreviousPage() & hasNextPage()
283283

284284
This method returns a boolean ``true`` if there are links to a page before and after, respectively, the current page being displayed.
285285

286-
Their difference to `hasPrevious() & hasNext()`_ is that they are based on the current page while `hasPrevious() & hasNext()`_ are based on the set of links to be displayed before and after the current page based on the value passed in `setSurroundCount()`_.
287-
288286
For example, let's say we have 20 pages of data. The current
289287
page is page 3. If the surrounding count is 2, then the following links would show up like this::
290288

@@ -293,17 +291,25 @@ page is page 3. If the surrounding count is 2, then the following links would sh
293291
``hasPreviousPage()`` would return ``true`` since there is page 2. And,
294292
``hasNextPage()`` would return ``true`` since there is page 4.
295293

294+
.. note:: The difference to `hasPrevious() & hasNext()`_ is that they are based
295+
on the current page while `hasPrevious() & hasNext()`_ are based on the set
296+
of links to be displayed before and after the current page based on the value
297+
passed in `setSurroundCount()`_.
298+
296299
getPreviousPage() & getNextPage()
297300
---------------------------------
298301

299-
These methods return a **URL** for the previous and next pages in relation to the current page being displayed, unlike `getPrevious() & getNext()`_ that return the URL for the previous or next pages of results on either side of the numbered links. See the previous paragraph for a full explanation.
302+
These methods return a **URL** for the previous and next pages in relation to the current page being displayed.
300303

301304
For example, you have the current page set at 5 and you want to have the links before and after (the surroundCount) to be 2 each, that will give you something like this::
302305

303306
3 | 4 | 5 | 6 | 7
304307

305308
``getPreviousPage()`` returns the URL for page 4. ``getNextPage()`` returns the URL for page 6.
306309

310+
.. note:: `getPrevious() & getNext()`_ returns the URL for the previous or next
311+
pages of results on either side of the numbered links.
312+
307313
If you want page numbers instead of URLs, you can use the following methods:
308314

309315
getPreviousPageNumber() & getNextPageNumber()
@@ -314,9 +320,12 @@ These methods return the page number for the previous or next pages in relation
314320
getFirstPageNumber() & getLastPageNumber()
315321
------------------------------------------
316322

317-
These methods return page numbers to the first and last pages in the current pages
323+
These methods return the page numbers to the first and last pages in the current pages
318324
being displayed.
319325

326+
.. note:: Unlike `getFirst() & getLast()`_, these methods return the numbers in
327+
the current pages being displayed.
328+
320329
getCurrentPageNumber()
321330
----------------------
322331

0 commit comments

Comments
 (0)