Pagination Problem

  • Thread starter Thread starter ragtek
  • Start date Start date
R

ragtek

Guest
I run into a problem with pagination, which i've never seen before:(


template:
Code:
<xen:pagenav link="xxx"  linkdata="{$user}"  page="{$page}" perpage="{$perPage}"    total="{$totalAttachments}"  />
controller is sending all necessary vars:
PHP:
        $params = array(
            'xxx' => $xxx,
            'users' => $users,
            'user' => $user,
            'page' => $page,
            'perPage' => Ragtek_NAG_Config::PER_PAGE,
            'totalAttachments' => $this->_getModel()->countAttachments($conditions, $fetchOptions),
        );
It's working and showing the navigation, but the page links are false
i'm getting index.php?xxx/&page=2
instead of index.php?xxx/page=2


I've checked the sourcecode and saw this
Code:
<div class="PageNav"
data-page="1"
data-range="2"
data-start="2"
data-end="2"
data-last="3"
data-sentinel="{{sentinel}}"
data-baseurl="index.php?xxx/&amp;page=%7B%7Bsentinel%7D%7D">
 
<span class="pageNavHeader">Page 1 of 3</span>
IMO the data-baseurl should be
Code:
index.php?xxx/page-{{sentinel}}
like it's for forums and all other things.....

my route build link method:
PHP:
    public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
    {
        if(isset($data) && isset($data['user_id']))
        {
            $action = XenForo_Link::getPageNumberAsAction($action, $extraParams);
            return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'user_id', 'username');
        }
        return XenForo_Link::buildBasicLink($outputPrefix, $action, $extension, $data);
    }

anybody have a idea why it's escaped?
 
Top Bottom