Domanda

There are 11 pages and I am using modulus => 8 which shows 9 page numbers at a time.

Following is the code:

echo $this->Paginator->numbers(
    array('modulus' => 8,
        'separator' => false,
        'before' => '',
        'after' => '',
        'tag' => 'li',
        'class' => false,
        'currentClass' => 'disabled',
        'currentTag' => 'a'
    )
);

The problem is that ellipses ... is not appearing in the pagination numbers. I am using cakephp 2.4.xx and in the documentation its written that ellipses appear automatically.

Please guide me how to bring the ... in the pagination numbers.

È stato utile?

Soluzione

it works only when 'first' or 'last' are set to an integer value.

i.e.:

echo $this->Paginator->numbers(
    array('modulus' => 8,
        'separator' => false,
        'before' => '',
        'after' => '',
        'tag' => 'li',
        'class' => false,
        'currentClass' => 'disabled',
        'currentTag' => 'a',
        'first' => 3,
        'last' => 3,
    )
);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top