123456789101112131415161718192021222324252627 |
- {% if data['page']['total'] > 1 %}
- {%set current = int(data['page']['current']) %}
- {% if current > 1 %}
- {%set prev = current-1 %}
- {% else %}
- {%set prev = 1 %}
- {% end %}
- {% if current >= data['page']['total'] %}
- {%set next = data['page']['total'] %}
- {% else %}
- {%set next = current+1 %}
- {% end %}
- {% if '?' in url %}
- {%set cUrl = url +'&page=' %}
- {% else %}
- {%set cUrl = url +'?page=' %}
- {% end %}
- <div class="paging">
- <a href="{{cUrl}}{{prev}}" class="prev"></a>
- <em>{{data['page']['current']}}</em><span>/</span><span>{{data['page']['total']}}</span>
- <a href="{{cUrl}}{{next}}" class="next"></a>
- </div>
- {% end %}
|