Login

BetterPaginator Template Code

Author:
spankalee
Posted:
May 7, 2007
Language:
Python
Version:
.96
Tags:
pagination paginator
Score:
-1 (after 1 ratings)

Example usage of BetterPaginator

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
		{% spaceless %}
			{% if paginator.has_previous_page %}
				<a class="paginator arrow" href="{{ paginator.previous_link }}">&#171; Previous</a>
			{% else %}
				<span class="paginator disabled arrow">&#171; Previous</span>
			{% endif %}
			<!-- {{ paginator.start_index }} - {{ paginator.end_index }} of {{ paginator.hits }} -->
			{% for set in paginator.windowed_page_links %}
				{% if not forloop.first %}...{% endif %}
				{% for p in set %}
					{% if p.2 %}
						<span class="paginator current_page">{{ p.0 }}</span>
					{% else %}
						<a class="paginator" href ="{{ p.1 }}">{{ p.0 }}</a>
					{% endif %}
				{% endfor %}
			{% endfor %}
			{% if paginator.has_next_page %}
				<a class="paginator arrow" href="{{ paginator.next_link }}">Next &#187;</a>
			{% else %}
				<span class="paginator disabled arrow">Next &#187;</span>
			{% endif %}
		{% endspaceless %}

More like this

  1. BetterQuerySetPaginator by zeeg 7 years ago
  2. BetterPaginator by spankalee 8 years, 2 months ago
  3. deleted by hassa 2 years, 3 months ago
  4. Simple Response with Pagination for API REST by aguilarpgc 6 days, 1 hour ago
  5. Pretty Paginator Tag by sbaechler 3 years, 5 months ago

Comments

Please login first before commenting.