Welcome Guest, Not a member yet? Register   Sign In
Views vs. Models
#4

[eluser]Iverson[/eluser]
[quote author="xwero" date="1219930630"]Personally don't like the use of objects in the views. Crafters example in my hands would be
Code:
//controller
$data['content'] = ($logged_in)?$this->load->view("logged_in_user_message"):$this->load->view("not_logged_in_user_message");
// view
<h1> Some html text </h1>
&lt;?php echo $content ?&gt;
[/quote]

This is pretty much the route I'm going now. However, I can assume from your suggestion that you have more views than models and controllers? I guess I always thought of views in more of a general template versus using them for different instances. Maybe I'll look into that...


Messages In This Thread
Views vs. Models - by El Forum - 08-25-2008, 07:27 AM
Views vs. Models - by El Forum - 08-28-2008, 02:25 AM
Views vs. Models - by El Forum - 08-28-2008, 02:37 AM
Views vs. Models - by El Forum - 08-28-2008, 08:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB