Welcome Guest, Not a member yet? Register   Sign In
Getting data from view file itself
#6

[eluser]xwero[/eluser]
Models are dummy classes, only by setting the third parameter in the load->model call it becomes tied in with the database. You can use models for any data related functionality. For instance i use them to put the validation in thus separating it from the data fetching/manipulating model and the controller.

To get back on topic, you could autoload a model with method(s) that are needed for all pages. Change the codeigniter/CodeIgniter.php file to add the methods to the views using the load->get_vars method. How you can change it you can read here.


Messages In This Thread
Getting data from view file itself - by El Forum - 06-22-2008, 08:46 PM
Getting data from view file itself - by El Forum - 06-22-2008, 09:38 PM
Getting data from view file itself - by El Forum - 06-29-2008, 11:25 AM
Getting data from view file itself - by El Forum - 06-29-2008, 12:10 PM
Getting data from view file itself - by El Forum - 06-29-2008, 12:24 PM
Getting data from view file itself - by El Forum - 06-29-2008, 03:28 PM
Getting data from view file itself - by El Forum - 06-29-2008, 05:01 PM
Getting data from view file itself - by El Forum - 06-30-2008, 02:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB