Styling the pagination helper in CakePHP 3.6

Hi, I’m trying to style the pagination helper to give me a way out like this:

<div class="col col-fila1">
     ID Persona
        <a href="/users/index?sort=persona_id&amp;direction=asc" class="enlace"  id="enlace">▲</a>       
        <a href="/users/index?sort=persona_id&amp;direction=desc"  class="enlace" id="enlace">▼</a>

Actually, I have it like this:

<div class="col col-fila1">
        ID Persona
        <?= $this->Paginator->sort('personal_id','▲', null, ['direction' => 'asc']); ?>
        <?= $this->Paginator->sort('personal_id'.'▼', null, ['direction' => 'desc']); ?>      

But it gives me back:

<div class="col col-fila1">
        ID Persona
        <a href="/users/index?sort=persona_id&amp;direction=asc">▲</a>       
        <a href="/users/index?sort=persona_id&amp;direction=desc">▼</a>

How can I identify a class and an ID to the “a” connector?

and here you have all possible templates

1 Like

Thanks, I modified the template of sort and it works.

Now I have another problem and is that the sort does not work, neither ascending nor descending, does nothing.

In the controller I have:

public $paginate = [
                        'fields' => [
                                     '', 'Users.persona_id', 'Users.nombre',
                                     'Users.apellido', 'Users.imagen_id' , '',
                                     'Users.role', '', 'Users.creado', 'Users.modificado'
                        'limit' => 25,
                        'order' => ['' => 'asc']

    public function initialize() {

public function index() {
        //$this->set('users', $this->paginate());
        $users = $this->paginate($this->Users);
        $this->set('users', $users);