Welcome Guest, Not a member yet? Register   Sign In
Undefined index
#6

[eluser]matt2012[/eluser]
Ok here's how ive solved this one

created a helper

loaded the helper in the constructor

in the helper I created a function called template($page) where ive assigned lots of $data['foo'] = 'bar';

and then assigned $data = template('home') in the functions within the controller

this way I can keep the template separate from the controller functions - I guess this is not miles away from
Yats but I found yats a bit more than I needed.


Messages In This Thread
Undefined index - by El Forum - 06-30-2007, 09:50 AM
Undefined index - by El Forum - 06-30-2007, 11:22 AM
Undefined index - by El Forum - 06-30-2007, 04:28 PM
Undefined index - by El Forum - 06-30-2007, 11:57 PM
Undefined index - by El Forum - 07-01-2007, 04:16 AM
Undefined index - by El Forum - 07-01-2007, 06:15 AM
Undefined index - by El Forum - 07-01-2007, 10:20 AM
Undefined index - by El Forum - 07-01-2007, 02:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB