Skip to content

Instantly share code, notes, and snippets.

@novusidea
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save novusidea/7ce3e8768e14a7ca8dff to your computer and use it in GitHub Desktop.
Save novusidea/7ce3e8768e14a7ca8dff to your computer and use it in GitHub Desktop.
CakePHP UIkit Pagination
<?php if( $this->Paginator->counter('{:pages}') > 1 ) : ?>
<ul class="uk-pagination">
<?php
echo $this->Paginator->prev(
'<i class="uk-icon-angle-double-left"></i>',
array(
'tag' => 'li',
'escape' => false,
'disabledTag' => 'span',
'class' => false
),
null,
array(
'tag' => 'li',
'escape' => false,
'disabledTag' => 'span',
'class' => 'uk-disabled'
)
);
echo $this->Paginator->numbers(
array(
'first' => 1,
'last' => 1,
'ellipsis' => '<li><span>...</span></li>',
'modulus' => 4,
'currentClass' => 'uk-active',
'currentTag' => 'span',
'separator' => false,
'tag' => 'li'
)
);
echo $this->Paginator->next(
'<span><i class="uk-icon-angle-double-right"></i></span>',
array(
'tag' => 'li',
'escape' => false,
'disabledTag' => 'span',
'class' => false
),
null,
array(
'tag' => 'li',
'escape' => false,
'disabledTag' => 'span',
'class' => 'uk-disabled'
)
);
?>
</ul>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment