[eluser]onecurlyfry[/eluser]
Hey all -
I'm currently loading 8 rss feeds into panel style divs on my page. I then aggregate those feeds into various arrays, passing them into googles charts/graphs API to return 4 charts in panel style divs as well.
I have a controller on my page that handles most of the logic. After logic, model calls/data returning, etc the last line in that controller is:
$this->load->view('layout', $data);
(I use $data['content'], $data['footer'], $data['header'] etc... then in the view I simply say something like <?=isset($content) ? $content : ''?> to display content)
Ultimately, what this means is when you load this page, there's 5-6 seconds of a blank screen prior to the page loading in its entirety. What I'd like to do is load the layout initially, then add an ajax-style "loading" gif over the panels. As each panel loads, the content would display and the ajax loader would be removed.
It's similar to any mashup/widget style site I'm sure you've all seen before.
I have no problems loading the ajax loader & hiding it when the panel is loaded. What I don't know is how to do this with CI.
Obviously I need to load the view first. I just don't know how to set the hooks (non-CI hooks I expect) to fire off the PHP code to load each of the panels. Are they separate views, in and of themselves? Do I load them as a string:
$data['twitter'] = $this->load->view('twitter', $rss_twitter, true);
How do I pass them back into the view?
I'm sure this is simpler than I'm giving it credit for, I'm just stuck right now. Your help is appreciated.
Scott