{# Shared pagination control. {% from "components/pagination.html" import render_pagination %} {{ render_pagination(pagination, 'main.marketplace') }} {{ render_pagination(pagination, 'marketplace.my_listings', {'q': q or none, 'status': status or none, 'sort': sort}) }} `endpoint` is the route to link to; `args` are extra query params preserved across pages (None values are dropped by url_for). Renders nothing for a single page. #} {% macro render_pagination(pagination, endpoint, args={}) %} {% if pagination.pages > 1 %} {% endif %} {% endmacro %}