Skip to content

Instantly share code, notes, and snippets.

@lukemorton
Created January 21, 2011 13:50
Show Gist options
  • Save lukemorton/789698 to your computer and use it in GitHub Desktop.
Save lukemorton/789698 to your computer and use it in GitHub Desktop.
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Example extends Controller {
public function action_index()
{
$this->request->response = new View_Example;
// or $this->response->body(new View_Example); in K3.1
}
}
<!doctype html>
<html>
<head>
<title>{{title}}</title>
</head>
<body>
<h1>{{title}}</h1>
</body>
</html>
<?php defined('SYSPATH') or die('No direct script access.');
class View_Example extends Kostache {
public $title = 'Page title';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment