LISE pagination active item
Posted: Fri Nov 14, 2025 4:43 pm
Hi all,
Here is my code (slightly modified) for LISE pagination summary template
Now I need to add an active class to current pagination list item.
As {$page->link} outputs <a> tag with the number of page. So I thought to somehow compare {$pagenumber} with the current page and add 'active' class.
Any ideas?
Many thanks
Here is my code (slightly modified) for LISE pagination summary template
Code: Select all
{if $pagecount > 1}
<!-- pagination -->
<div class="paginationWrapper">
<ul class="pagination">
{if $pagenumber > 1}
<li class="page-item"><a class="page-link" href="{$prevurl}">Previous</a></li>
{/if}
{foreach from=$pagelinks item=page}
<li class="page-item">{$page->link}</li>
{/foreach}
{if $pagenumber < $pagecount}
<li class="page-item"><a class="page-link" href="{$nexturl}">Next</a></li>
{/if}
</ul>
</div>
<!-- pagination //-->
{/if}As {$page->link} outputs <a> tag with the number of page. So I thought to somehow compare {$pagenumber} with the current page and add 'active' class.
Any ideas?
Many thanks