_pagination partial - CrystalCommerce Liquid Documentation for Designers

_pagination partial

File: _pagination.liquid

Default Liquid Template

<div id="pagination">
{% if pages.page_count > 1 %}
	{% if pages.current != pages.first %}
		<a href="{{ category | category_paginated_url: pages.first }}">First</a>
	{% endif %}

	{% if pages.current.previous %}
		<a href="{{ category | category_paginated_url: pages.current.previous }}">Prev</a>
	{% endif %}

	Page {{ pages.current.number }} of {{ pages.page_count }}

	{% if pages.current.next %}
		<a href="{{ category | category_paginated_url: pages.current.next }}">Next</a>
	{% endif %}

	{% if pages.current != pages.last %}
		<a href="{{ category | category_paginated_url: pages.last }}">Last</a>
	{% endif %}
{% endif %}
</div>

Default Mobile Liquid Template

<div id="pagination">
{% if pages.page_count > 1 %}
	{% if pages.current != pages.first %}
		<a href="{{ category | category_paginated_url: pages.first }}">First</a>
	{% endif %}

	{% if pages.current.previous %}
		<a href="{{ category | category_paginated_url: pages.current.previous }}">Prev</a>
	{% endif %}

	Page {{ pages.current.number }} of {{ pages.page_count }}

	{% if pages.current.next %}
		<a href="{{ category | category_paginated_url: pages.current.next }}">Next</a>
	{% endif %}

	{% if pages.current != pages.last %}
		<a href="{{ category | category_paginated_url: pages.last }}">Last</a>
	{% endif %}
{% endif %}
</div>