Welcome Guest, Not a member yet? Register   Sign In
Displaying html only if condition is true
#3

[eluser]xwero[/eluser]
I call those things microviews, view files that only have one purpose and therefor can be reuse by different apps.

You can create a microviews helper
Code:
function view_message($message)
{
    $ci = & get_instance();
    return $ci->load->view('microviews/error_message',array('message'=>$message),TRUE);
}
And functions for other microviews you need.
In your controller or in your view you do
Code:
$data[’notification’] = view_message($error);
You could do the load->view every time but it is monkey work.


Messages In This Thread
Displaying html only if condition is true - by El Forum - 07-09-2008, 07:44 AM
Displaying html only if condition is true - by El Forum - 07-09-2008, 08:01 AM
Displaying html only if condition is true - by El Forum - 07-09-2008, 08:09 AM
Displaying html only if condition is true - by El Forum - 07-09-2008, 08:28 AM
Displaying html only if condition is true - by El Forum - 07-09-2008, 08:33 AM
Displaying html only if condition is true - by El Forum - 07-09-2008, 09:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB