JustinHawk
Well-known member
well the only issue i'm having that the pagination links are not coming as i want so can anyone help me to fix that and tell me what wrong i'm doing
code in php file
code in template for page nav
the problem is i want links to be like this
localhost/index.php?members/admin.1/test&page=2
but it gives
localhost/index.php?members/admin.1/page-2/test
so can anyone her help ?
code in php file
PHP:
public function actionTest(ParameterBag $params)
{
$user = $this->assertViewableUser($params->user_id);
$visitor = \XF::visitor();
$Repo = $this->repository('XF:Thread');
$finder = $Repo->jtest($user);
if (!$visitor->hasPermission('general', 'jtest'))
{
return $this->noPermission();
}
$total = $finder->total();
$page = $this->filterPage();
$perPage = $this->options()->jtestoption;
$this->assertValidPage($page, $perPage, $total, 'members/test', $user);
$this->assertCanonicalUrl($this->buildLink('members/test', $user, ['page' => $page]));
$testarray = $finder->limitByPage($page, $perPage)->fetch();
$viewParams = [
'testarray' => $testarray,
'page' => $page,
'perPage' => $perPage,
'total' => $total,
'user' => $user
];
....
code in template for page nav
Code:
<xf:pagenav page="{$page}" perpage="{$perPage}" total="{$total}"
link="members/test" data="{$user}"
wrapperclass="block-outer-main" />
the problem is i want links to be like this
localhost/index.php?members/admin.1/test&page=2
but it gives
localhost/index.php?members/admin.1/page-2/test
so can anyone her help ?