Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% if posts.lastPage > 1 %}
- <ul class="pagination">
- {% if posts.currentPage > 1 %}
- {% if (posts.currentPage == 2) %}
- <li><a href="{{ listPage|page({ (pageParam): null }) }}">← </a></li>
- {% else %}
- <li><a href="{{ listPage|page({ (pageParam): (posts.currentPage - 1) }) }}">← </a></li>
- {% endif %}
- {% endif %}
- {% for page in 1..posts.lastPage %}
- {% if (page == 1) %}
- <li class="{{ posts.currentPage == page ? 'active' }}">
- <a href="{{ listPage|page({ (pageParam): null }) }}">{{ page }}</a>
- </li>
- {% else %}
- <li class="{{ posts.currentPage == page ? 'active' }}">
- <a href="{{ listPage|page({ (pageParam): page }) }}">{{ page }}</a>
- </li>
- {% endif %}
- {% endfor %}
- {% if posts.lastPage > posts.currentPage %}
- <li><a href="{{ listPage |page({ (pageParam): (posts.currentPage + 1) }) }}"> →</a></li>
- {% endif %}
- </ul>
- {% endif %}
Add Comment
Please, Sign In to add comment