0

I have implemented a pagination technique and the pages seems to work well when I edit in the url, but page 1 cannot be clicked and is still active even though I have changed to the second or third page.

http://carplate2.satumalaysiahosting.com/component/sppagebuilder/?view=page&id=62&start=8

$db = JFactory::getDbo(); $query = "SELECT COUNT(*) FROM `#__bidding_items` WHERE `state` = '1'"; $db->setQuery($query); $total = $db->loadResult(); $limit=8; $limitstart=0; jimport('joomla.html.pagination'); $pagination = new JPagination($total, $limitstart, $limit); echo $pagination->getPagesLinks(); 
0

1 Answer 1

0

You need to set $limitstart argument to the current start item. You can get the value from input:

$app = JFactory::getApplication(); $limitstart = $app->input->getInt('limitstart', 0); $pagination = new JPagination($total, $limitstart, $limit, $app); 
0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.