Welcome Guest, Not a member yet? Register   Sign In
$data in Views not inhereted
#1

[eluser]Lobosaurus[/eluser]
Hi,

I used this pattern in CI 1.54:

- Controller "X" has loaded "View 1" with some $data.
- "View 1" has loaded another view "View 2" with $data from "View 1".
- I accessed $data in View 2 and they were same as in "View 1".

In CI 1.6 it gives me notice, that $data variable is undefined in "View 2".
#2

[eluser]Pascal Kriete[/eluser]
When loading "View 2" within "View 1" you don't have to pass $data again, it will have access to the data array you passed to your top view.




Theme © iAndrew 2016 - Forum software by © MyBB