            {% if page != 1 %}
                        <li class="page-item"><a href="{{ url_for('shop.subcategory',
                sub_id=subcategory.id, page=page-1) }}" class="page-link">
                                <<</a> </li> {% endif %} {%for x in range(1, total_pages+1)%} {%if x==page%} <li class="page-item active">
                                    <a href="{{ url_for('shop.subcategory',
                sub_id=subcategory.id, page=loop.index) }}" class="page-link"> {{page}} <span class="sr-o