How to output the variables to all the views files |
output the variables to all the views files, I use "$this->load->vars($data)" in old version CI.
how about in CI4? I Query data from database, then the data can be called in any of view files.
Not sure if this what you mean but it will persist the data.
PHP Code: echo view('blogview', $data, ['saveData' => true]); Additionally, if you would like the default functionality of the view method to be that it does save the data between calls, you can set $saveData to true in application/Config/Views.php. See Also: View Renderer What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(11-16-2016, 09:56 AM)InsiteFX Wrote: Not sure if this what you mean but it will persist the data.THanks, InsiteFX. it was solved. |
Welcome Guest, Not a member yet? Register Sign In |