CodeIgniter: call a view within a model


How do I call a view from within a model in CodeIgniter?


AFAIK you can only call them from the controller…

Models should not reference views.

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.

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.

If you think the html page is large then split it up on its own, and have it call the pieces.