Welcome Guest, Not a member yet? Register   Sign In
Trouble with system vars
#4

[eluser]jedd[/eluser]
Yeah, this stuff is fairly well explained in the documentation, and again in the oodles of tutorials.

The way you're doing this is a bit confusing, to my mind. Calling views within views is not something that sits well with me. Check out [url="http://codeigniter.com/wiki/Header_and_Footer_and_Menu_on_every_page_-_jedd/"]this page[/url] in the wiki - it's how I repeat lumps of code throughout my site, but in passing it'll show you another way you can do this - by calling view partials and storing the results into a variable. Knowing both approaches means you can work out what way sits better with the way you work/think.

In any case, you still need to put variables into an array, and call that with your view loads - even if you're loading that view from within another view. You can look at load_vars() (?) - which will get this stuff everywhere for you, as an alternative, and might work better for you if you stick with the hierarchical view-within-a-view method.


Messages In This Thread
Trouble with system vars - by El Forum - 09-26-2009, 06:28 PM
Trouble with system vars - by El Forum - 09-26-2009, 06:31 PM
Trouble with system vars - by El Forum - 09-26-2009, 08:53 PM
Trouble with system vars - by El Forum - 09-27-2009, 05:11 AM
Trouble with system vars - by El Forum - 09-27-2009, 10:08 AM
Trouble with system vars - by El Forum - 09-27-2009, 12:14 PM
Trouble with system vars - by El Forum - 09-27-2009, 02:11 PM
Trouble with system vars - by El Forum - 09-27-2009, 03:34 PM
Trouble with system vars - by El Forum - 09-29-2009, 03:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB