Trying to get a keyword going to print the number of the next page below the next button in an asset listing but can’t get it too work. Currently going with something like this in order to include additional html and classes:
<li class="next">
%next_page^replace_keywords:notempty:<a href="{next_page_href}">Next <span class="visuallyhidden">page</span><span class="page-numbers">{page_number} of {total_pages}</span></a>%
</li>
Which works perfectly and means my pagination only shows when the next button is visible. So far so good. However, was thinking I could just use another modifier to add 1 to each page number but it doesn’t work:
<li class="next">
%next_page^replace_keywords:notempty:<a href="{next_page_href}">Next <span class="visuallyhidden">page</span><span class="page-numbers">{page_number^add:1} of {total_pages}</span></a>%
</li>
As you would expect this works out side of my main keyword:
%page_number^add:1% of %total_pages%
Can’t help but thinking I’m either missing something obvious or taking the wrong approach here…