[eluser]ranjudsokomora[/eluser]
Hello runrun,
You could do a number of things here... Here are a few:
# 1 You could send a view variable and load a secondary view inside layout_view.php
Your controller would look like:
Code:
class Register extends controller{
function index()
{
$data['secondary_page'] = "register_view";
$this->load-view('register_view',$data)
}
}
And your view would look like:
Code:
<html lang="en">
<head>
</head>
<body>
<!--load my view here-->
<?PHP $this->load->view($secondary_page); ?>
</body>
</html>
# 2 You could break up your layout_view.php into two views, and using your controller you could load three total views. So you would have something like this:
header_view.php
Code:
<html lang="en">
<head>
</head>
<body>
register_view.php
Code:
<h1>register</h1>
<form method="post" action="">
<input type="text" name="name" value="" />
</form>
footer_view.php
Code:
</body>
</html>
Your controller would look like this:
Code:
class Register extends controller{
function index()
{
$this->load->view('header_view');
$this->load->view('register_view');
$this->load->view('footer_view');
}
}