Skip to content

Instantly share code, notes, and snippets.

@dhrrgn
Created December 2, 2010 19:41
Show Gist options
  • Save dhrrgn/725921 to your computer and use it in GitHub Desktop.
Save dhrrgn/725921 to your computer and use it in GitHub Desktop.
An example template controller
<?php
namespace Fuel\Application;
class Controller_Hello extends Controller\Template {
public $template = 'vm';
public function action_index()
{
$this->template->title = 'My Awesome App Title';
$this->template->body = View::factory('hello', array('name' => 'Dan'));
}
}
Hello <?php echo $name; ?>
<html>
<head>
<title><?php echo $title; ?></title>
</head>
<body>
<?php echo $body; ?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment