[eluser]dsentker[/eluser]
Hello,
i've got this view (very simplified, of course
) :
Code:
<html>
<head><?php echo $title; ?></head>
<body>
<?php echo $content; ?>
</body>
</html>
In the Controller, i would normally use this to fill this view:
Code:
$data['title'] = 'Hello World!';
$data['content'] = '<h1>Good Morning!</h1><p>Hello World!</p>';
$this->load->view('viewfile');
But what if i want to assign a view-file to the $data-array? Disregard the Syntax, like that:
Code:
<!-- contentfile.php: -->
<h1>Good Morning!</h1>
<p>Hello World!</p>
Code:
$data['title'] = 'Hello World!';
$data['content'] = this->view('contentfile');
$this->load->view('viewfile');