Minimalist View Library - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Minimalist View Library (/showthread.php?tid=33081) |
Minimalist View Library - El Forum - 08-15-2010 [eluser]Unknown[/eluser] Since the standard way of passing data to a view is kinda awkward (array syntax is ugly and there's no real reason for having a local variable for something that's not used locally) i put together a little library that makes it behave like I want it to. So, here's the library: libraries/view.php Code: <?php And this is a sample controller: controllers/welcome.php Code: <?php There's no difference for views. It doesn't do much, but I think it makes the code a little tidier and easy to read. |