part
The Part
object represents of a navigation in Paginate
object, it contains following attributes:
Object Fields
Field | Data Type | Description |
---|---|---|
part.is_link | Boolean | Returns true if the part is clickable |
part.page | Number | Returns the page number of the part |
part.title | String | Returns the title of the part. |
part.url | String | Returns the url link of the part. |
Code Example
{% if paginate.previous.is_link %}
<li>
<a href="{{ paginate.previous.url }}"></a>
</li>
{% endif %}
{% for part in paginate.parts %}
<li class="{% if part.page == paginate.current_page %}active{% endif %}">
<a href="{{ part.handle }}">{{ part.title }}</a>
</li>
{% endfor %}
Updated about 1 year ago