Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2436

phpBB Custom Coding • Set additonal class on .page-jump if current page = 1

$
0
0
This should be easy, and probably is, but I have tried several things and none of them work.

These examples avoid the white page of death, but apply the extra class even when on the second and subsequent pages of the thread.

Code:

<!-- IF BASE_URL and TOTAL_PAGES > 6 --><li class="page-jump<!-- BEGIN pagination --><!-- IF pagination.PAGE_NUMBER == 1 --> no-previous<!-- ENDIF --><!-- END pagination -->">

Code:

<!-- IF BASE_URL and TOTAL_PAGES > 6 --><li class="page-jump<!-- BEGIN pagination --><!-- IF pagination.PAGE_NUMBER === 1 --> no-previous<!-- ENDIF --><!-- END pagination -->">
Everything else I have tried is worse). pagination.PAGE_NUMBER should be the correct variable, since that is what the standard pagination uses to denote the current page, and it always has a simple numerical value, which is obviously 1 when on the first page.

Code:

<!-- ELSEIF pagination.S_IS_CURRENT --><li class="active"><span aria-current="page">{pagination.PAGE_NUMBER}</span></li>
Despite this, no joy. Anyone got an idea?

Statistics: Posted by Gumboots — Sun Mar 30, 2025 1:33 am



Viewing all articles
Browse latest Browse all 2436

Trending Articles