Created
December 2, 2010 19:41
-
-
Save dhrrgn/725921 to your computer and use it in GitHub Desktop.
An example template controller
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 | |
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')); | |
} | |
} |
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
Hello <?php echo $name; ?> |
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
<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