Welcome Guest, Not a member yet? Register   Sign In
Hooks with DB or other solution
#10

[eluser]Rick Jolly[/eluser]
It might be a little late for the following suggestion:
Your problem is another example of why subclassing the CI controller is such a good idea. If all your pages had extended a single custom controller you could have just added the data for the footer in the custom parent controller's constructor using $this->load->vars();

Ok, another simple alternative that might actually help you at this stage:
You could create a simple helper that gets and returns the data, then just call that helper directly from the view. Within a helper you can get the CI instance using $CI =& get_instance();. Once you have the reference to the CI instance, you can do anything that you would do from within your controller (call models, libraries, access inputs (session, url, post), even load a view!).


Messages In This Thread
Hooks with DB or other solution - by El Forum - 08-06-2007, 12:53 PM
Hooks with DB or other solution - by El Forum - 08-06-2007, 01:04 PM
Hooks with DB or other solution - by El Forum - 08-06-2007, 04:48 PM
Hooks with DB or other solution - by El Forum - 08-21-2007, 12:35 AM
Hooks with DB or other solution - by El Forum - 08-21-2007, 08:03 AM
Hooks with DB or other solution - by El Forum - 08-21-2007, 09:39 AM
Hooks with DB or other solution - by El Forum - 08-21-2007, 10:17 AM
Hooks with DB or other solution - by El Forum - 08-21-2007, 10:20 AM
Hooks with DB or other solution - by El Forum - 08-21-2007, 10:24 AM
Hooks with DB or other solution - by El Forum - 08-21-2007, 02:14 PM
Hooks with DB or other solution - by El Forum - 08-22-2007, 01:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB