Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make page_count and current accessible from Twig #58

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions classes/plugin/PaginationHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,30 @@ public function nextUrl()

return null;
}

/**
* Return the current page
*/
public function currentPage()
{
return $this->current;
}

/**
* Return the items per page
*/
public function itemsPerPage()
{
return $this->items_per_page;
}

/**
* Return the total number of pages
*/
public function pageCount()
{
return $this->page_count;
}

public function params()
{
Expand Down