Skip to content

Commit

Permalink
Fix docs (closes ddnexus#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Aug 25, 2024
1 parent b83f160 commit 851b74d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/api/frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ my_link = a.(page_number, text, classes:, aria_label:)

#### The anchor_string argument

If you need to add some HTML attribute to ALL the page links, you can pass the `:anchor_string` keyword argument to any pagy
helper, or if you use templates or override helpers, you can pass it also to the `pagy_anchor` method.
This argument is typically used for passing `data-*` attributes to the enabled anchor. Avoid using it for attributes that have
more specific ways to be set (e.g.: `class` should be added with a specific CSS rule).

If you need to add some HTML attribute to ALL the enbled page links (no `current` nor `gap`), you can pass the `:anchor_string`
keyword argument to any pagy helper, or if you use templates or override helpers, you can pass it also to the `pagy_anchor`
method.

!!!warning Attributes Must be Valid HTML
For performance reasons, the `:anchor_string` string must be formatted as valid HTML attribute/value pairs because it will get
Expand Down

0 comments on commit 851b74d

Please sign in to comment.