Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
problem with pagination
bogachev
March 2014
Suggest why this action displayed immediately as the last page of the sample pagination:
public function action_two($id){
$this->template->title = 'Каталог запчастей';
$query = Model_Catalog::query()->where('parent1', $id);
$config = array(
'pagination_url' => \Fuel\Core\Uri::base(false).'catalog/two',
'total_items' => $query->count(),
'per_page' => 30,
'uri_segment' => 3,
'num_links' => 3,
'show_first' => true,
'show_last' => true,
);
$pagination = Pagination::forge('mypagination', $config);
$data['catalog'] = Model_Catalog::query()
->rows_offset($pagination->offset)
->rows_limit($pagination->per_page)
->where('parent1',$id)
->get();
$data['pagination'] = $pagination;
$data['category'] = Model_Catalog::query()->where('lever',2)->where('parent1',$id)->get();
$this->template->content = \Fuel\Core\View::forge('public/two',$data);
}
bogachev
March 2014
sorry figured it was necessary to add another segment pagination_url
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
bogachev
March 2014