[eluser]nuttynibbles[/eluser]
hi,
i would like to load view into another view file.
e.g:
View files:
These are the 3 view files that will be called on every controller. They are the basic templates.
header.php
index.php
footer.php
index.php will look like this. So basically i include header.php and footer.php into index.php:
Code:
<?php
include_once('header.php');
?>
<tr>
<td>
<!--content-->
<table class="table_main">
<tr><td class="td_roundertop"></td></tr>
<tr><td class="td_content"><br /><?=$content ?></td></tr>
<tr><td class="td_rounderbottom"></td></tr>
</table>
</td>
</tr>
<tr><td style="height:10px;"></td></tr>
<?php include_once('footer.php'); ?>
this is how i will call them in the controller:
$this->data['content']="hello world";
$this->load->view('index',$this->data);
$this->data['content'] will contain the different forms or tables that will be displayed.
Therefore, register form, login form, edit profile form and etc etc, i would like to put them into view files too. For example, the files are:
register.php
login.php
editprofile.php
so now i would like to call this reigster.php view file and put them into $this->data['content'].
How can I do this? or anyone with a different idea to go about this?
Thks