#
In
#
💚 Methods
The @pagy instance provides methods for every navigation tag and helper to use in your code.
Its class is determined by the paginator used, but you can safely ignore it. Simply utilize its methods.
The @pagy methods are autoloaded only if used!
Unused code consumes no memory.
data_hash
headers_hash
links_hash
page_url
nav_tag
nav_js_tag
combo_nav_js_tag
info_tag
limit_selector_js_tag
a_tags
- No arguments: default pagy style
:bootstrap- Set
classes: 'pagination any_class'style option to override the default'pagination'class.
- Set
:bulma- Set
classes: 'pagination any_class'style option to override the default'pagination is-centered'classes.
- Set
id: 'my-nav':- Set the
idHTML attribute of thenavtag.
- Set the
aria_label: 'My Label':- Override the default
pagy.aria_label.navstring of thearia-labelattribute. (Use an already pluralized string).
Don't rely on ARIA default with multiple nav elements!
The
navelements arelandmark roles, and should be distinctly labeled.Override the default
:aria_labels for multiple navs with distinct values!<%# Explicitly set the aria_label %> <%== @pagy.nav_tag(aria_label: 'Search result pages') %>Refer to ARIA for additional information.
- Override the default