HubDB Post Number Pagination && HubDB Post Pagination (Next|Previous) Posts

// HubDB Post Number Pagination {% if dynamic_page_hubdb_table_id %}
    {% set paginationPost = hubdb_table_rows(dynamic_page_hubdb_table_id) %} {% set totalPostCount = paginationPost|length %}
  • {% for post in paginationPost %} {% if dynamic_page_hubdb_row.hs_path == post.hs_path %} {{ loop.index }} {% endif %} {% if loop.last %} / {{ totalPostCount }} {% endif %} {% endfor %}
{% endif %} // HubDB Post Pagination (Next|Previous) Posts {% if dynamic_page_hubdb_table_id %}
    {% set filterData = 'orderBy=hs_name' %} {% set paginationPost = hubdb_table_rows(dynamic_page_hubdb_table_id, filterData) %} {% for post in paginationPost %} {% if dynamic_page_hubdb_row.hs_path == post.hs_path %} {% set prevPostIndex = loop.index + 1 %} {% set nextCount = loop.index - 1 %} {% endif %} {% if loop.index == prevPostIndex %} {% endif %} {% if dynamic_page_hubdb_row.hs_path == post.hs_path %} {% for post in paginationPost %} {% if loop.index == nextCount %} {% endif %} {% endfor %} {% endif %} {% endfor %}
{% endif %}

Comments

Popular posts from this blog

Numbered Pagination in HubDB

Dynamic Pages Number Pagination in HubDB (Listing)

Tabber in Tabber