Created
May 20, 2010 03:06
-
-
Save zombor/407141 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class View_Complex extends Kostache | |
{ | |
public $title = 'Testing'; | |
public function loggedin_status() | |
{ | |
return Auth::logged_in() ? 'logged in as '.Auth::instance()->account->username : NULL; | |
} | |
public function things() | |
{ | |
return Inflector::plural(get_class(new Model_Test)); | |
} | |
public function tests() | |
{ | |
return AutoModeler::factory('test')->fetch_all(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>{{title}}</title> | |
</head> | |
<body> | |
<h1>{{title}}</h1> | |
{{loggedin_status?}}<p>{{loggedin_status}}</p>{{/loggedin_status?}} | |
<p>Here are all my {{things}}:</p> | |
<ul> | |
{{#tests}} | |
<li><strong>{{id}}:</strong> ({{name}}:{{value}})</li> | |
{{/tests}} | |
</ul> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment