The Controller
- Code: Select all
public function test(){
$data['title'] = 'Hi This is Title!';
$data['content'] = 'Some content here...';
//Both syntax can be used:
$this->view()->render('rich', $data);
// $this->render('rich', $data);
}
The View rich.html
- Code: Select all
<html>
<head>
<title>{{title}}<title>
</head>
<body>
<p>hello {{content}}</p>
</body>
</html>
