Welcome Guest, Not a member yet? Register   Sign In
Application structure?
#6

[eluser]cahva[/eluser]
Well there are 2 options:

1. Save the modulelist in $this->data['modulelist'] and then you can access that and pass $this->data to your layout.
2. Use $this->load->vars($data) after you are done with it in MY_Controller. This will make $modulelist accessible from everywhere including views.

So remember, if you set a variable using $data = 'something', its only accessible on that methods scope. So when you set $this->data in MY_Controller and your controllers extend from it, they will be available.


Messages In This Thread
Application structure? - by El Forum - 04-18-2010, 05:38 AM
Application structure? - by El Forum - 04-18-2010, 12:46 PM
Application structure? - by El Forum - 04-18-2010, 02:16 PM
Application structure? - by El Forum - 04-18-2010, 04:13 PM
Application structure? - by El Forum - 04-18-2010, 04:20 PM
Application structure? - by El Forum - 04-18-2010, 04:25 PM
Application structure? - by El Forum - 04-18-2010, 04:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB