Welcome Guest, Not a member yet? Register   Sign In
returning views as a data
#2

(02-26-2020, 02:38 PM)dp41646 Wrote: Hi!
I've just installed for first time CI4, and one thing I can't see in docs is old feature of returning views as a data.
This was done by adding third bool parameter (true) when loading view.
I can see that now there are array as a third option parameter, so is there any option similar to this old feature?

Thx

In CI4 views are actually returning data, so you could do this in controller:
PHP Code:
$pageContent $view->render('myview'); //now $pageContent has rendered HTML page 

Also you might find interesting new feature ViewCells, it works same way: https://codeigniter4.github.io/userguide...cells.html
Reply


Messages In This Thread
returning views as a data - by dp41646 - 02-26-2020, 02:38 PM
RE: returning views as a data - by zahhar - 02-27-2020, 06:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB