• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
seperate parts of page I just can't get my head around this please help!!!

#1
[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?

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

The FAQ on the wiki

#3
[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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.