Frage

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.

War es hilfreich?

Lösung

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,
    )
);
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top