Download the PHP package hashtagerrors/craft-pagination without Composer
On this page you can find all versions of the php package hashtagerrors/craft-pagination. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download hashtagerrors/craft-pagination
More information about hashtagerrors/craft-pagination
Files in hashtagerrors/craft-pagination
Download hashtagerrors/craft-pagination
More information about hashtagerrors/craft-pagination
Files in hashtagerrors/craft-pagination
Vendor hashtagerrors
Package craft-pagination
Short Description Pagination plugin for Craft 3
License MIT
Package craft-pagination
Short Description Pagination plugin for Craft 3
License MIT
Please rate this library. Is it a good library?
Informations about the package craft-pagination
Pagination plugin for Craft CMS
Requirements
This plugin requires Craft CMS 3.0.0 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require hashtagerrors/craft-pagination
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Pagination.
Pagination Overview
This plugin helps you render the following types of paginations :
- First & Next Pagination
- Ellipsis Pagination
- Numeric Pagination
Using Pagination
To render paginations you need to use the following code:
{% paginate craft.entries.section('blog').limit(1) as pageInfo, pageEntries %}
{{ craft.pagination.render(pageInfo, type, options) }}
- pageInfo is the Craft's PaginateVariable given in
{% paginate %}
tag. - type is the kind of pagination you want to render. Available values are :
- firstNext
- ellipsis
- numeric
- options provides you a way to customize the html that is rendered through the plugin. Available options are:
- ulClass : Class to add in
<ul>
- liClass : Class to add in
<li>
- aClass : Class to add in
<a>
- activeClass : Class to be added on current page
<li>
. Default active. - includeFirstLast : Set
true
if you need to show First and Last link in pagination. Default false. (Only available for Numeric Pagination) - firstText : The text for First Link. Default First .
- lastText : The text for Last Link. Default last .
- includePrevNext : Set
true
if you need to show Previous and Next link in pagination. (Only available for Numeric Pagination). Default false. (Only available for Numeric Pagination) - prevText : The text for Previous Link. Default < Prev.
- nextText : The text for Next Link. Default Next >.
- pageRange : Number of Previous and Next Links you want to show. Default 3.
- showPageInfo : Set
true
to show Page curent of total. Default false.
- ulClass : Class to add in
Templating Examples
First & Next Pagination
{{ craft.pagination.render(pageInfo, 'firstNext', {
ulClass: 'pagination',
liClass: 'page-item',
aClass: 'page-link',
showPageInfo : true,
prevText: '<i class="fa fa-angle-double-left" aria-hidden="true"></i> Prev',
nextText: 'Next <i class="fa fa-angle-double-right" aria-hidden="true"></i>'
}) }}
Ellipsis Pagination
{{ craft.pagination.render(pageInfo, 'ellipsis', {
ulClass: 'pagination',
liClass: 'page-item',
aClass: 'page-link',
activeClass: 'active',
includeFirstLast: true,
includePrevNext: true,
prevText: '<i class="fa fa-angle-double-left" aria-hidden="true"></i> Prev',
nextText: 'Next <i class="fa fa-angle-double-right" aria-hidden="true"></i>',
pageRange: 1
}) }}
Numeric Pagination
{{ craft.pagination.render(pageInfo, 'numeric', {
ulClass: 'pagination',
liClass: 'page-item',
aClass: 'page-link',
activeClass: 'active',
includeFirstLast: true,
includePrevNext: true,
pageRange: 3
}) }}
Pagination Roadmap
- Give users more options to make paginations much more dynamic.
New ideas are always welcome. You can post your idea or request here
Attribution
Icon made by Freepik from Flaticon.
Brought to you by Hashtag Errors
All versions of craft-pagination with dependencies
PHP Build Version
Package Version
Requires
craftcms/cms Version
^3.0.0-RC1
The package hashtagerrors/craft-pagination contains the following files
Loading the files please wait ....