Welcome Guest, Not a member yet? Register   Sign In
Creating a Basic CMS system
#2

[eluser]Aken[/eluser]
Any content you want to display on a page should be inserted into a view, instead of directly from the controller. You insert any content via an array, and then pull the data inside the view.

Controller:
Code:
// Your header view would go here.

$data['text'] = "Hello, world!";

$this->load->view('view.php', $data)

view.php:
Code:
<p>&lt;?php echo $text; ?&gt;</p>


Messages In This Thread
Creating a Basic CMS system - by El Forum - 10-19-2008, 03:01 PM
Creating a Basic CMS system - by El Forum - 10-20-2008, 12:46 AM
Creating a Basic CMS system - by El Forum - 10-20-2008, 08:05 AM
Creating a Basic CMS system - by El Forum - 10-20-2008, 09:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB