[eluser]Doug Lerner[/eluser]
In the docs, when describing the calendar class, they give an example:
Code:
$this->load->library('calendar');
echo $this->calendar->generate();
That works fine, but you normally wouldn't want to do that inside the class, would you?
I changed this to:
In the Controller class definition:
Code:
$this->load->library('calendar');
$data['calendar'] = $this->calendar->generate();
$this -> load -> view('blogview', $data);
And in the view file, I added
Code:
<?= $calendar ?>
in an appropriate place.
Am I approaching this the preferred way? Or are people tending to lump everything into the controller?
It seems one nice thing about using a framework like this is that the view file itself is then easy for a designer to modify any way they want without seeing the underlying code. All they need to know are the variables they have access to, right?
Thanks,
doug