Welcome Guest, Not a member yet? Register   Sign In
undefined variable
#2

If you take a good look at the error message, you will see that the problem lies in the view method of your controller.
There, you define the $data['post'] variable (post is single here), which is passed to the view posts/index. That's why the posts/index view says the posts variable (prural) has not been defined.
You are using the same view for listing all posts and for showing the details of one individual post. Using two different views makes more sense, I guess.
Reply


Messages In This Thread
undefined variable - by anmol - 03-25-2017, 12:39 PM
RE: undefined variable - by Wouter60 - 03-25-2017, 11:25 PM
RE: undefined variable - by anmol - 03-25-2017, 11:35 PM
RE: undefined variable - by Wouter60 - 03-25-2017, 11:49 PM
RE: undefined variable - by anmol - 03-25-2017, 11:56 PM
RE: undefined variable - by anmol - 03-25-2017, 11:58 PM
RE: undefined variable - by Wouter60 - 03-26-2017, 03:11 AM
RE: undefined variable - by ChicagoPhil - 03-26-2017, 01:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB