[eluser]kimon[/eluser]
Hi all,
first of all I would like to thank the CI Stuff for just a great framework, and of course the community here for the great job they do with helping people with their knowledge. Thank you both !!!
Now, I use CI for building CMS-eShop project. That project will be my pilot for all other similar projects that I will make, so I decided to invest on something that I could reuse.
My question:
I have a controller where I do simple things:
Code:
$data['body']= $body_content;
$data['sidebar'] = $sidebar_content;
$this->load->view('default.php', $data);
my default.php view is the following:
Code:
<div id="main">
<div id="content">
<?php echo $body; ?>
</div>
<div id="sidebar">
<?php echo $sidebar; ?>
</div>
</div>
is it possible to have a view like this
Code:
<div id="main">
<div id="content">
<?php displayBody(); ?>
</div>
<div id="sidebar">
<?php displaySidebar(); ?>
</div>
</div>
and the displayBody() and displaySidebar() function would be declared in a helper (or somewhere else) ?
Of course I tried to access them from inside a helper, but with no success.