You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This method returns a boolean ``true`` if there are links to a page before and after, respectively, the current page being displayed.
285
285
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
-
288
286
For example, let's say we have 20 pages of data. The current
289
287
page is page 3. If the surrounding count is 2, then the following links would show up like this::
290
288
@@ -293,17 +291,25 @@ page is page 3. If the surrounding count is 2, then the following links would sh
293
291
``hasPreviousPage()`` would return ``true`` since there is page 2. And,
294
292
``hasNextPage()`` would return ``true`` since there is page 4.
295
293
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
+
296
299
getPreviousPage() & getNextPage()
297
300
---------------------------------
298
301
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.
300
303
301
304
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::
302
305
303
306
3 | 4 | 5 | 6 | 7
304
307
305
308
``getPreviousPage()`` returns the URL for page 4. ``getNextPage()`` returns the URL for page 6.
306
309
310
+
.. note:: `getPrevious() & getNext()`_ returns the URL for the previous or next
311
+
pages of results on either side of the numbered links.
312
+
307
313
If you want page numbers instead of URLs, you can use the following methods:
308
314
309
315
getPreviousPageNumber() & getNextPageNumber()
@@ -314,9 +320,12 @@ These methods return the page number for the previous or next pages in relation
314
320
getFirstPageNumber() & getLastPageNumber()
315
321
------------------------------------------
316
322
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
318
324
being displayed.
319
325
326
+
.. note:: Unlike `getFirst() & getLast()`_, these methods return the numbers in
0 commit comments