homepage set... moving on? newb help |
[eluser]Unknown[/eluser]
so, i have my homepage and loading the templates. now, i'm trying to get a second page (about us) working. not sure how to go about doing that... here is my controller thus far (as of right now, i'm not using a database) Code: class Home extends Controller { so i assume i would use the same controller and just add to it. i basically want an "about us" page that uses a different template (i understand how to set the template using the view loader). also confused about the url structure needed to access this page. ideally i just want "index.php/about" if someone could break this down for me i would GREATLY appreciate it.
[eluser]danmontgomery[/eluser]
The url structure is: Quote:http://www.mydomain.tld/{controller}/{me...parameters}... Where the default method is index(). So, Quote:http://www.mydomain.tld/home Will point to the Home controller, and the index method. To go to about, you would have a method in the Home controller called about(), and the url would be: Quote:http://www.mydomain.tld/home/about If you want to remove home from that url, you'd need to use custom routing. You can read about routing (and the above) at http://ellislab.com/codeigniter/user-gui...uting.html
[eluser]Bart v B[/eluser]
So, the second parameter you can make a new function: Code: class Home extends Controller { |
Welcome Guest, Not a member yet? Register Sign In |