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) }}

Comments

lamp5 created an issue. See original summary.

lamp5’s picture

Assigned: lamp5 » Unassigned
Status: Active » Needs review
StatusFileSize
new1.03 KB
lamp5’s picture

StatusFileSize
new1.1 KB

Up. fixed Url to be a object.

ivnish’s picture

Hi lamp5! Commited

ivnish’s picture

Version: 8.x-1.x-dev » 2.x-dev
Status: Needs review » Fixed

  • ivnish committed 3bc26728 on 2.x authored by lamp5
    Issue #3209102 by lamp5, ivnish: Use link() function in template to...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.