Welcome Guest, Not a member yet? Register   Sign In
Manual pagination problem in CI4.
#1

Hello,

Sorry for my english

I have the following problem when paging manually,

I can't make the pager links look good.

I need the following links:

http://localhost/test_pagination/index.p...cto/list/1 <--- page
http://localhost/test_pagination/index.p...ect/list/2
http://localhost/test_pagination/index.p...cto/list/3 .... etc

in the controller
function list ($page = 1 ,,,,,,) {

And the pager gives me the following:

http://localhost/project/list/1 ....
http://localhost/project/list/2 ....
http://localhost/project/list/3 ....
With $ pager->setPath (); I can not configure the links as in ci3,

$ this-> load-> library ('pagination');
$ config = $ this-> pager_config;
$ config ['base_url'] = site_url ('project / list /');

Does anyone have the same problem?




PHP Code:
$data_db $this->proyecto_model->list_proyecto $data_search$limit$page);
$total_rows $this->proyecto_model->list_proyecto_all $data_search );
$pager = \Config\Services::pager();
//$pager->setPath();
$data ['pagination'] = $pager->makeLinks($page$limit$total_rows'paginador_bootstrap'$uri_segment); 
Reply


Messages In This Thread
Manual pagination problem in CI4. - by hugoafr - 07-10-2020, 07:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB