CodeIgniter Forums
seperate parts of page I just can't get my head around this please help!!! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: seperate parts of page I just can't get my head around this please help!!! (/showthread.php?tid=2464)



seperate parts of page I just can't get my head around this please help!!! - El Forum - 08-07-2007

[eluser]Crabby[/eluser]
Hi Guys

I just can't get my head around this please help!!!

My main template layout is as follows;

Code:
<div id="wrapper">
  <div id="header">&lt;?=$header?&gt;</div>
  <div id="content">&lt;?=$content?&gt;</div>
  <div id="right_column">&lt;?=$right_column_content?&gt;</div>
  <div id="footer">&lt;?=$footer?&gt;</div>
</div>

Now the header and footer content is simple as it's just HTML, but for the right column I want to be able to show latest news articles, latest events etc IE dynamic data.

So there for would I have to fetch data for the right hand column, header, footer and the main content in each seperate controller?


seperate parts of page I just can't get my head around this please help!!! - El Forum - 08-07-2007

[eluser]sophistry[/eluser]
Turn to the FAQ.

The FAQ on the wiki


seperate parts of page I just can't get my head around this please help!!! - El Forum - 08-07-2007

[eluser]Michael Wales[/eluser]
Just pass an array from the Controller to whatever view you have listed above. The view included within this view will be able to read that array perfectly fine, as if it was all in one-large file.