Welcome Guest, Not a member yet? Register   Sign In
logical help

I have a template in which i need to show the news.
news have controller ....when ever i have to load the any other controller
news variables are undefined.

plz help me.

You must understand that CI loads controllers - not views.
So, URL such as: somedomain.com/somepage
Will actually trigger CI to execute controller named 'somepage'. That controller then triggers some view.

If you open news controller, then it will have variables.
But, once you open some other controller, vars from news are gone.

If you want your news variables on every page, then you should move news code to library and call that lib from every controller you need.

Hope you get the idea Smile


Theme © iAndrew 2016 - Forum software by © MyBB