Some help with a view, controller question? |
[eluser]adultnapper[/eluser]
Hi i'm just new to CI, in fact, new to the MVC frameworks and MVC architecture. Although i read the full user guide of CI, i have a big question that i can't find the answer. Sorry if this has been asked before and my search thought the forums failed. Ok so i have my controller, with my index function that loads my view, and a custom private function that i made, and it starts with the _ so i'm sure it's private and can't be accesed thru the URI segments. My problems is, i don't know how to call it in my view, how to use output from it, etc, this sounds silly and simple but i can't get it to work, guess i must have a square head! Thanks for your time.
[eluser]bretticus[/eluser]
You don't call it in your view. You call it in your controller and pass the results to your view. capiche?
[eluser]FinalFrag[/eluser]
Try checking out the video tutorials on the CI homepage. There are 2 video's that will help you a lot !
[eluser]adultnapper[/eluser]
Thanks, i will look at the videos, i missed those. And bretticus, is there any other way to pass it on except to load a view with the $data array ?
[eluser]TheFuzzy0ne[/eluser]
Check out my [url="http://ellislab.com/forums/viewthread/107773/"]CodeIgniter Resources[/url] thread. There's a lot of information there that may help you.
[eluser]bretticus[/eluser]
[quote author="adultnapper" date="1237480063"]Thanks, i will look at the videos, i missed those. And bretticus, is there any other way to pass it on except to load a view with the $data array ?[/quote] Apparently you can just set data that is accessible to all views. Code: $this->load->vars($array) I haven't used it but here's the loader documentation
[eluser]adultnapper[/eluser]
Thanks alot guys, really helped, also read the thread TheFuzzy0ne. Cheers. |
Welcome Guest, Not a member yet? Register Sign In |