Use link() function in template to allow adds a attributes

Created on 16 April 2021, over 3 years ago
Updated 6 July 2023, over 1 year ago

Problem/Motivation

Right now, "views show more pager" template creates link like:

<a href="{{ item.href }}" title="{{ 'Go to next page'|t }}" rel="next">{{ item.text }}</a>

So it is not possible to add class or other attribute using preprocessor.

Proposed resolution

Use twig link function.

{{ link(item.text, item.href, item.attributes) }}
📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇵🇱Poland lamp5 Rzeszow

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024