Welcome Guest, Not a member yet? Register   Sign In
Undefined variable $ inside template pagination
#1

(This post was last modified: 11-09-2023, 05:20 PM by rax.)

Hello all!
after upgrading from 4.2.2 to 4.4.3 and php7.4 to 8.2 my pagination template started to fail, isn't get some vars from controller, perhaps I missed something during upgrade and a little help can solve this issue.
Undefined variable $
----------
config/pager.php - OK
PHP Code:
public array $templates = [
'front_full'    => 'App\Views\layouts\custom_pagination',
]; 


Controllers/Main.php - OK
PHP Code:
public function pagination(){
        $this->data['page'] =  !empty($this->request->getVar('page')) ? $this->request->getVar('page') : 1;
        $this->data['perPage'] =  10;
return 
view('pages/list'$this->data);


/Views/pages/list.php - OK
PHP Code:
$pager->makeLinks($page$perPage'front_full'


/Views/layouts/custom_pagination.php- OK but don't receive $page or $perPage vars... -> Undefined variable $page and $perPage


Thank you for your support,
Reply


Messages In This Thread
Undefined variable $ inside template pagination - by rax - 11-09-2023, 12:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB