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

Commits on Mar 1, 2022

  1. Make page_count and current accessible from Twig

    There are times when it is necessary to show the page_count and current page in Twig templates (for example, "2/6" to mean "page 2 of 6"). This pull request aims to expose variables `current`, `items_per_page`, and `page_count`.
    
    I am not good with making pull requests, so if there is any mistake, please tell me, and I will try my best to fix it. Thanks!
    kylxbn committed Mar 1, 2022
    Configuration menu
    Copy the full SHA
    b77b986 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2022

  1. Add @return annotations

    I had to use `intval()` because `ceil()` returns a `double` by default, so I wanted to cast it to `int` first.
    kylxbn committed Mar 2, 2022
    Configuration menu
    Copy the full SHA
    1598b28 View commit details
    Browse the repository at this point in the history
  2. Use int cast instead of intval()

    Sorry!
    kylxbn committed Mar 2, 2022
    Configuration menu
    Copy the full SHA
    cca92e0 View commit details
    Browse the repository at this point in the history