XF 2.3 Pagination URLs pagenav

Sysnative

Well-known member
Hey all,

I'm trying to get this pagination link to work correctly - I have the following code in my template:

Code:
<xf:pagenav page="{$page}" perpage="{$perPage}" total="{$total}" link="addon-link/{$forum.node_id}" />

I'd like the URL structure to be:

addon-link/<node_id>/page-2

The current pagination keeps defaulting to: addon-link/page-2/node_id and I'm not sure how to reverse these.

Any suggestions welcome.

Thanks!
 
In this case the link is likely just addon-link and you'd need to pass the route parameters as an associative array in the params attribute:

HTML:
<xf:pagenav page="{$page}" perpage="{$perPage}" total="{$total}" link="addon-link" params="{$forum}" />

This assumes your route format is something like :int<node_id,title>/:page.
 
In this case the link is likely just addon-link and you'd need to pass the route parameters as an associative array in the params attribute:

HTML:
<xf:pagenav page="{$page}" perpage="{$perPage}" total="{$total}" link="addon-link" params="{$forum}" />

This assumes your route format is something like :int<node_id,title>/:page.

Unfortunately this generates the same URL issue - the output is:

:index.php?addon-link/page-2:

{$forum} is available in the template and is used elsewhere. The route format is :int<node_id,title>/:page


The pagenav I'm loading on the start page which is:
index.php?addon-link/2/

2 is the forum ID.
 
Back
Top Bottom