if feeds current href page1 endif if feeds current href page feeds cur

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{% if feeds.current - 2 > 1 %}
<a href="/page1/">
1
</a>
...
{% endif %}
{% if feeds.current - 1 > 0 %}
<a href="/page{{ feeds.current - 1}}/">
{{ feeds.current - 1}}
</a>
{% endif %}
{% if feeds.current %}
<span>
{{ feeds.current }}
</span>
{% endif %}
{% if feeds.current + 1 <= feeds.total_pages %}
<a href="/page{{ feeds.current + 1 }}/">
{{ feeds.current + 1 }}
</a>
{% endif %}
{% if feeds.current + 2 <= feeds.total_pages %}
<a href="/page{{ feeds.current + 1 }}/">
{{ feeds.current + 2 }}
</a>
...
<a href="/page{{ feeds.total_pages }}/">
{{ feeds.total_pages }}
</a>
{% endif %}