[eluser]theprodigy[/eluser]
One quick question. I went through the tutorial, and go the ToDo backend setup.
I tried to create the front-end, and ran into a small issue.
Steps I took:
1. Created todo.php controller in modules/todo/controllers directory.
2. Put the following code into the todo controller
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Todo extends Front_Controller {
public function __construct()
{
parent::__construct();
$this->load->model('Todo_model', 'todo', true);
}
public function index()
{
Template::set('items', $this->todo->order_by('todo_id', 'desc')->find_all_by('deleted', 0));
Template::render();
}
}
3. Created the index.php view inside the modules/todo/views/todo directory.
4. Put the following code inside the index.php view file:
Code:
<?php if (isset($items) && is_array($items) && count($items)) : ?>
<h3>ToDo Items</h3>
<table>
<tbody>
<?php foreach ($items as $item) : ?>
<tr>
<td><?php echo $item->description ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
5. Directed my browser to: localhost/bonfire/todo
6. Recevied the error: 'Unable to locate the file: todo/index.php' (The base template is rendering, but not the content for the template - see screenshot)
Can you please let me know where my error is?
So far, this app looks pretty cool. You can tell you've put quite a bit of work into it. Although maybe a little docs on creating front-end views would be good too (for people like me

)