Welcome Guest, Not a member yet? Register   Sign In
is this ok in a view?
#1

[eluser]Fenix[/eluser]
With the MVC pattern, is it ok to put something like this in a view?

Code:
if logged in
    show logout link
else
    show login link
end if

More specifically, is it ok to actually check the session for things like this right in the view? Something like:

Code:
if ($this->session->userdata('id') >0)
{
    // show logout
}
else
{
    // show login
}


Messages In This Thread
is this ok in a view? - by El Forum - 08-22-2008, 09:18 AM
is this ok in a view? - by El Forum - 08-22-2008, 10:20 AM
is this ok in a view? - by El Forum - 08-22-2008, 01:53 PM
is this ok in a view? - by El Forum - 08-22-2008, 02:28 PM
is this ok in a view? - by El Forum - 08-22-2008, 02:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB