A better way to handle views? |
[eluser]JREAM[/eluser]
I was trying to think of a good way to handle views, So if I want a create form to appear in the users/create I pop it in like below, but you can imagine this would get fairly bloated! Code: public function index() Previously In Smarty and PHP I had it this way: Code: if ($_REQUEST['create']) { Code: {if $create == true}{include file=user_create.tpl}{/if} Maybe I can do it similarly with passing the $data variable, but I'd like to see if there is a smarter way to do this
[eluser]flaky[/eluser]
why don't you use template library http://www.williamsconcepts.com/ci/codei.../template/
[eluser]JREAM[/eluser]
Thank you! I am new to all this an this will be great |
Welcome Guest, Not a member yet? Register Sign In |