l4dd13 — 2011-11-07T14:25:06-05:00 — #1
How do I call a view from within a model in CodeIgniter?
gman — 2011-11-07T20:54:02-05:00 — #2
AFAIK you can only call them from the controller...
oddz — 2011-11-07T22:16:39-05:00 — #3
Models should not reference views.
l4dd13 — 2011-11-08T04:39:50-05:00 — #4
Well partials then...
To me it makes more sense to call a partial for the likes of a form within a model as opposed to having the form within a much larger html file which the controller calls.
oddz — 2011-11-08T13:35:58-05:00 — #5
A form is a view that populates itself by consuming model data. Models should not be aware or rely on a views existence otherwise there is a flaw in the infrastructure considering models are completely decoupled from views in MVC.
gman — 2011-11-08T14:06:24-05:00 — #6
If you think the html page is large then split it up on its own, and have it call the pieces.