Multiple Level URLs? |
[eluser]heavener[/eluser]
Okay, so I know how to create URLs (like http://example.com/page/) by creating a controller and including views within it. But how do I create URLs with more than one depth level of pages (like http://example.com/page/another/page)? Anyone know? :question: Thanks all.
[eluser]TheFuzzy0ne[/eluser]
You objective doesn't make a great deal of sense to me, however, [url="http://ellislab.com/forums/viewthread/106502/"]my alternate URI syntax library[/url] might help you.
[eluser]JayTee[/eluser]
Check the user guide for the url helper: http://ellislab.com/codeigniter/user-gui...elper.html Specifically, you can go as deep as you want with the anchor() function: Code: <?php
[eluser]jdfwarrior[/eluser]
call me crazy, i think hes referring to functions. the first step is the controller, second is which function in the controller, third and on are variables passed
[eluser]JayTee[/eluser]
[quote author="jdfwarrior" date="1235988770"]call me crazy, i think hes referring to functions. the first step is the controller, second is which function in the controller, third and on are variables passed[/quote] jdfwarrior, you're crazy I guess I didn't read the post closely enough. If you **really** wanted to have sub-controllers/functions like the OP describes - it seems a bit silly. But to answer the question; I guess one way would be to treat the parameters as part of a redirect: URL: http://www.example.com/controller1/metho...r2/method2 Controller1: Code: //in this case, would redirect the user to http://www.example.com/controller2/method2 |
Welcome Guest, Not a member yet? Register Sign In |