Hi
I am trying to add pagination to my webpage, but I got an error " Unknown tag 'paginate' ". I am little confused why this error popped up.
Please help!
Below is my code:
<div class="container">
<div class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<div class="page-heading">
{% include 'breadcrumbs' %}
</div>
{% entitylist key: page.adx_entitylist.id %}
{% entityview logical_name: 'Laptop' name:'Active All Device Informations', page_size: 20 %}
{%- paginate entityview.records by 20 -%}
{% for item in entityview.records %}
<item>
<div name="content" style="padding: 15px 30px 0 0;">
<h2>{{ item.cr02c_name }}</h2>
<h3>{{ item.cr02c_devicetype }}</h3>
<div name="image" style="width: 300px; float: left; padding: 0 0 4 15px;"><img src="{{item.cr02c_photo}}" style="float: left;"></div>
<div name="main-content" style="margin-left: 350px; max-width: 800px;">
<p>{{ item.cr02c_title }}</p>
<p>{{ item.cr02c_memory }}</p>
<p>{{ item.cr02c_manufacturername }}</p>
<p>{{ item.cr02c_price }}</p>
<p>{{ item.cr02c_processor }}</p>
<p>{{ item.cr02c_screensize }}</p>
<p>{{ item.cr02c_storage }}</p></br></br></br></br>
</div>
<div class="clear"></div>
</div>
</item>
{% endfor %}
{%- if paginate.pages > 1 -%}
<nav role="navigation">
<ol class="pagination">
{%- if paginate.previous -%}
<li>
<a href="{{ paginate.previous.url }}">
<span aria-hidden="true">«</span>
Previous <span class="visuallyhidden">page</span>
</a>
</li>
{%- else -%}
<li class="disabled">
<span aria-hidden="true">«</span>
Previous <span class="visuallyhidden">page</span>
</li>
{%- endif -%}
{%- for part in paginate.parts -%}
{%- if part.is_link -%}
<li>
<a href="{{ part.url }}">
<span class="visuallyhidden">page</span> {{ part.title }}
</a>
</li>
{%- else -%}
{%- if part.title == paginate.current_page -%}
<li class="active" aria-current="page">
<span class="visuallyhidden">page</span> {{ part.title }}
</li>
{%- else -%}
<li>
<span class="visuallyhidden">page</span> {{ part.title }}
</li>
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- if paginate.next -%}
<li>
<a href="{{ paginate.next.url }}">
Next <span class="visuallyhidden">page</span>
<span aria-hidden="true">»</span>
</a>
</li>
{%- else -%}
<li class="disabled">
Next <span class="visuallyhidden">page</span>
<span aria-hidden="true">»</span>
</li>
{%- endif -%}
</ol>
</nav>
{%- endif -%}
{% endpaginate %}
<style>
.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
white-space: nowrap;
}
.pagination li {
display: inline;
margin: 0 5px;
}
</style>
{% endentityview %}
{% endentitylist %}
</div>
</div>
</div>
</div>