Skip to content

Add option to add attributes to pager links #7098

@docwilmot

Description

@docwilmot

Description of the need

Its not easy to add any classes or other attributes to pager links. theme_pager($variables) only accepts tags, element, parameters, and quantity; it should have an option for attributes as well. Note that theme_pager_link($variables) accepts attributes but this isn't passed on from the parent function.

Proposed solution

Add option to add attributes to the variables array.

Alternatives that have been considered

You can add a *_preprocess_pager_link() but this would add any attributes to all pager links.
Or override theme_pager() completely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions