HubDb Simple PRev & next Pagination
{{ module.title }} {% set category = "&category=" ~module.category %} {% set table = hubdb_table_rows(module.hubdbtable_field , category) %} {# set the number of items per batch #} {% set batch_num = 6 %} {# set the number of pages #} {% if table|length % batch_num == 0 %} {% set number_of_pages = (table|length|divide(batch_num) %} {% else %} {% set number_of_pages = (table|length / batch_num) %} {% endif %} {# set the active batch #} {% if Query.page_num %} {% set page_num = Query.page_num %} {% else %} {% set page_num = 1 %} {% endif %} {% for row in table|batch(batch_num, '') %} {% if loop.index == page_num %} {% for innerRow in row %} {% if innerRow.name %} {{ innerRow.category }} {{ innerRow.name }} {{ innerRow.description }} Learn more ...