Welcome Guest, Not a member yet? Register   Sign In
[Modular Extensions] Print result from model in view.
#1

[eluser]BeingDefined[/eluser]
Forgive me but I'm just getting the gasp of ME and I have a question. I seen examples on how to load data from controllers into the view but I have not seen one that loads data from a model and into the view. Thanks
#2

[eluser]Johan André[/eluser]
Why would you load data from the model into the view?
Typically you use the controller for that.
The model should only handle the data and the controller controls the application logic, and that includes loading the correct views and feeding them with data.

If you follow this pattern you embrace the coolness of mvc and you'll end up in heaven. Smile

Read this from the userguide:
http://ellislab.com/codeigniter/user-gui...w/mvc.html

Modular Extension is a great extension to the framework, allowing you to group your models/views/controller in a single folder with a application structure. This makes it easier when writing reusable modules as you can (basically) copy one folder (which contains everything) into another app. The standard way of CI is having ALL your controllers, models and views in separate folders.

Good luck!




Theme © iAndrew 2016 - Forum software by © MyBB