Welcome Guest, Not a member yet? Register   Sign In
Really simple question regarding subpages.
#1

[eluser]Unknown[/eluser]
Hi,

This is probably a really ridicules question, but I seem to have missed something in the tutorials.

I am working on a site made in CI and I'm slightly confused about how pages are structured Undecided

Say I have the default welcome pages as my front page. I then make a new function in the "welcome.php" controller called "sub1". This calls a view called "view_sub1" with "$this->load->view('view_sub1')".

Now the path to this page is something like: http://localhost/mysite/welcome/sub1 right?

So what if i want sub1 to have page under it? With a URL like: http://localhost/mysite/welcome/sub1/sub2

I make a "view_sub2" view, but where should I put the function to call it? Still in the "welcome.php" controller? If so how?

Or should i create a new controller? If so how do i get it to be "under" the "welcome.php" controller?

Please kind sirs, help the noob. :down:




Theme © iAndrew 2016 - Forum software by © MyBB