Welcome Guest, Not a member yet? Register   Sign In
Default index function for controller rendering
#1

[eluser]davidk43[/eluser]
Odd this, I've only just started so the problem maybe obvious. I've just started an Account controller:

Code:
class Account extends Controller {

    function Account()
    {
            parent::Controller();    
    }
    
    function index()
    {
        $this->load->view('account');
    }
    
}

which has a matching view:


Code:
<?$this->load->view('template/header');?>

<h1>Your account</h1>

&lt;?$this->load->view('template/footer');?&gt;


If I type the URL:

Code:
http://domain/account/index

this renders correctly with the header/footer views around the index function. However this:

Code:
http://domain/account

will merely render the index function ignoring the partial views, so simply returning:

Code:
<h1>Your account</h1>

help?


Messages In This Thread
Default index function for controller rendering - by El Forum - 07-31-2007, 08:24 AM
Default index function for controller rendering - by El Forum - 07-31-2007, 09:43 AM
Default index function for controller rendering - by El Forum - 07-31-2007, 09:54 AM
Default index function for controller rendering - by El Forum - 07-31-2007, 10:35 AM
Default index function for controller rendering - by El Forum - 07-31-2007, 10:57 AM
Default index function for controller rendering - by El Forum - 07-31-2007, 12:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB