Skip to content

Commit 57eee44

Browse files
docs(web/guides): document paginationNav Bootstrap args and update CLAUDE.md
Add Bootstrap 5 like-for-like swap example to the 3x-to-4x upgrade guide's paginationLinks() section, and update CLAUDE.md Pagination View Helpers with the new prepend/append/prependToPage/appendToPage/addActiveClassToPrependedParent/ anchorDivider args added in #2715. Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
1 parent 026f1b1 commit 57eee44

2 files changed

Lines changed: 31 additions & 2 deletions

File tree

CLAUDE.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,17 +464,29 @@ Requires a paginated query: `findAll(page=params.page, perPage=25)`. The recomme
464464
#paginationNav()#
465465
#paginationNav(showInfo=true, showFirst=false, showLast=false, navClass="my-pagination")#
466466
467+
// Bootstrap 5 — like-for-like swap for legacy paginationLinks() Bootstrap markup
468+
#paginationNav(
469+
navClass="",
470+
prepend='<ul class="pagination">',
471+
append="</ul>",
472+
prependToPage='<li class="page-item">',
473+
appendToPage="</li>",
474+
class="page-link",
475+
classForCurrent="active",
476+
addActiveClassToPrependedParent=true
477+
)#
478+
467479
// Individual helpers for custom layouts
468480
#paginationInfo()# // "Showing 26-50 of 1,000 records"
469481
#firstPageLink()# // link to page 1
470482
#previousPageLink()# // link to previous page
471483
#pageNumberLinks()# // windowed page number links (default windowSize=2)
472484
#nextPageLink()# // link to next page
473485
#lastPageLink()# // link to last page
474-
#pageNumberLinks(windowSize=5, classForCurrent="active")#
486+
#pageNumberLinks(windowSize=5, classForCurrent="active", addActiveClassToPrependedParent=true)#
475487
```
476488

477-
Disabled links render as `<span class="disabled">` by default. All helpers accept `handle` for named pagination queries.
489+
Disabled links render as `<span class="disabled">` by default. All helpers accept `handle` for named pagination queries. `paginationNav()` also accepts `prepend`/`append` (HTML inside `<nav>` before/after the link list), `prependToPage`/`appendToPage` (per-anchor wrappers applied to all navigation anchors including first/prev/next/last), `addActiveClassToPrependedParent` (injects `active ` into the current-page `prependToPage` class attribute), and `anchorDivider` (separator between sections, default `" "`).
478490

479491
## Testing Quick Reference
480492

web/sites/guides/src/content/docs/v4-0-1-snapshot/upgrading/3x-to-4x.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,23 @@ See [Packages](/v4-0-1-snapshot/digging-deeper/packages/) for manifest fields, p
323323

324324
**CHANGELOG:** composable pagination helpers added (#1930). The 3.x `paginationLinks()` is retained. New code should use `paginationNav()` or compose the individual helpers (`paginationInfo`, `firstPageLink`, `previousPageLink`, `pageNumberLinks`, `nextPageLink`, `lastPageLink`).
325325

326+
Bootstrap-styled 3.x apps that relied on `paginationLinks()` emitting `<li class="page-item active">` wrappers can now do a like-for-like swap using `paginationNav()` with the Bootstrap-style arguments added in v4.0.1 (#2715):
327+
328+
```cfm
329+
##paginationNav(
330+
navClass = "",
331+
prepend = '<ul class="pagination">',
332+
append = "</ul>",
333+
prependToPage = '<li class="page-item">',
334+
appendToPage = "</li>",
335+
class = "page-link",
336+
classForCurrent = "active",
337+
addActiveClassToPrependedParent = true
338+
)##
339+
```
340+
341+
This produces markup equivalent to the 3.x output: `<nav><ul class="pagination"><li class="active page-item"><span class="page-link">N</span></li>…</ul></nav>`.
342+
326343
### RocketUnit test style
327344

328345
**CHANGELOG:** `Deprecated: RocketUnit test style for new tests` (#1925) and `Removed: Legacy RocketUnit core test scaffolding` (#1925). Existing app specs still run; the framework-level RocketUnit runner is gone. Do not write new tests in RocketUnit style.

0 commit comments

Comments
 (0)