El Forum
11-26-2007, 04:09 PM
[eluser]JimmyJ[/eluser]
Hey, i'm very new to cl and i'm going through the documentation.
I really really like it, but i'm stuck at something very simple!!
I'm going through the simple blog tutorial and i can't figure out how to spit out a simple calendar (or any other class for that matter) into my blogview.php page.
Code for blog.php is:
And my blogview.php is
How do i spit out the calendar to the page?
Hey, i'm very new to cl and i'm going through the documentation.
I really really like it, but i'm stuck at something very simple!!
I'm going through the simple blog tutorial and i can't figure out how to spit out a simple calendar (or any other class for that matter) into my blogview.php page.
Code for blog.php is:
Code:
<?php
class Blog extends Controller {
function index()
{
$this->output->cache(60);
$data['todo_list'] = array('Clean House', 'Call Mom', 'Run Errands');
$data['title'] = "My Real Title";
$data['heading'] = "My Real Heading";
$this->load->view('blogview', $data);
$this->load->library('calendar');
}
}
?>
And my blogview.php is
Code:
<html>
<head>
<title><?php echo $heading;?></title>
</head>
<body>
<h1><?php echo $heading;?></h1>
<h3>My Todo List</h3>
<ul>
<?php foreach($todo_list as $item):?>
<li><?php echo $item;?></li>
<?php endforeach;?>
</ul>
<?php echo $this->calendar->generate(); ?>
</body>
</html>
How do i spit out the calendar to the page?