Guest User

Untitled

a guest
Nov 24th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. {% if posts.lastPage > 1 %}
  2. <ul class="pagination">
  3. {% if posts.currentPage > 1 %}
  4. {% if (posts.currentPage == 2) %}
  5. <li><a href="{{ listPage|page({ (pageParam): null }) }}">&larr; </a></li>
  6. {% else %}
  7. <li><a href="{{ listPage|page({ (pageParam): (posts.currentPage - 1) }) }}">&larr; </a></li>
  8. {% endif %}
  9. {% endif %}
  10.  
  11. {% for page in 1..posts.lastPage %}
  12. {% if (page == 1) %}
  13. <li class="{{ posts.currentPage == page ? 'active' }}">
  14. <a href="{{ listPage|page({ (pageParam): null }) }}">{{ page }}</a>
  15. </li>
  16. {% else %}
  17. <li class="{{ posts.currentPage == page ? 'active' }}">
  18. <a href="{{ listPage|page({ (pageParam): page }) }}">{{ page }}</a>
  19. </li>
  20. {% endif %}
  21. {% endfor %}
  22.  
  23. {% if posts.lastPage > posts.currentPage %}
  24. <li><a href="{{ listPage |page({ (pageParam): (posts.currentPage + 1) }) }}"> &rarr;</a></li>
  25. {% endif %}
  26. </ul>
  27. {% endif %}
Add Comment
Please, Sign In to add comment