CodeIgniter Forums
is collapsible <div> in a view - legal MVC pattern? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: is collapsible <div> in a view - legal MVC pattern? (/showthread.php?tid=7242)



is collapsible <div> in a view - legal MVC pattern? - El Forum - 03-31-2008

[eluser]ICEcoffee[/eluser]
Hi, I'm just getting into using MVC and codeigniter and I'd like to know if it is 'acceptable' MVC practice to put code into a 'view' file to determine if a <div> is to be displayed or not?


is collapsible <div> in a view - legal MVC pattern? - El Forum - 03-31-2008

[eluser]Pascal Kriete[/eluser]
If I remember correctly, the wording for the definition of a view, is that it contains "presentation logic". So yes, basic loops and if statements are totally fine.