Do change folder names inside the application dir |
[eluser]v4et[/eluser]
Hello people I want to change the folder names inside mysite/app/views ,this without changing the whole site functionality,I just did some new invention made out of a codeigniter system and it works well in terms of achieving my goals,the only thing is that the browser bar shows an address that dont correspond to the page content,so in order to them to fit accordingly or euphoricily according I just need to match the folder from the browser bar to the page content,hope is understood it could be a php type of redirection command I dont know maybe like something I used on os commerce to change the "admin" folder name to another thing like "swing" ,hope you can bring some support,sore appreciated men
[eluser]davidMC1982[/eluser]
http://ellislab.com/codeigniter/user-guide/general/routing.html
[eluser]v4et[/eluser]
application/config/routes.php my assortment using wildcards and regular expressions would be: $route['mysite/app/views/newcomers'] = "mysite/app/views/oldcomers"; when the route newcomers was the actual browser's stock address for the page content related to old comers but with this wildcard the result navigation address would be oldcomer and like I said the page content oldcomer too,tell me please If Im right and if this would bring for the functioning page old comers the old comers navigation uri thank you
[eluser]v4et[/eluser]
Actually I guess code igniter calls controllers to all of the folders inside app/views ,if that is the case then I want to turn the newcomersignup.php that is inside the newcomer controller that is inside app/views ,so I want to turn it or become this url mysite.com/maydenhead/index.php/oldcomer/signUp Since all functionality inside the newcomer folder or controller has turned in to oldcomer pages Well in case you dont understand and could bring more commands for routing or any example of how to turn any browser url in to another diferent url using routing,yes examples with urls it all would be nice of you Or could be also that I want the newcomer signup controller to turn in to an url like this mysite.com/maydenhead/index.php/oldcomer/signUp how I do it?
[eluser]davidMC1982[/eluser]
Code: //It could be something like this - example.com/your/url In your case, assuming you simply want to map "newcomer/signup" to "oldcomer/signup", you'd just do: Code: route['oldcomer/signup'] = 'newcomer/signup'; I'm not sure why you keep mentioning views. Any view can be loaded in any controller and has nothing to do with routing or addresses/URI's.
[eluser]v4et[/eluser]
This dont work $route['http://www.mysite/maidenhead/index.php/newcomer/signUp'] = 'oldcomer/signup'; Old comer is not a controller just pages functions Also this didnt work $route['newcomer/signUp'] = 'oldcomer/signup'; Only newcomer is a controller folder ,but oldcomer dont exist as controller is just a resolution of pages functions that resolve in the pages as oldcomer Can you please explain what is rtfm? In case you mean $route['newcomer/signUp'] = 'controller/method'; //Or you could do something as silly as this - you get the idea route['any/route/i/like/can/route/anywhere/i/want'] = 'controller/method'; but instead of a controller can you assign a bare name that dont exist as controller? Look this is start to function $route['newcomer/signUp'] = but in other words what I want is to land in the same page but change the browser url of the page to old comer since is what is the page content The point is that the controller newcomer turned in to having oldcomer functionality and oldcomer dont exist as controller,so my page oldcomer signUp will always resolve to a browser url that is like this http://mysite/maidenhead/index.php/newcomer/signUp since newcomer is a controller thats why it will always resolve my oldcomer page to newcomer.like I said because oldcomer is not controller only newcomer I guess that for me in order to have my oldcomer page an oldcomer url I would need to change the name of the newcomer controler or set it to be identified as something else without modifying the final route that is a page with oldcomer content but brought with a newcomer route Thanks for enlighting me any more insights be whichever help me get my goals all are anylized and all give me inspiration to get closer all is truly appreciated thank you very much
[eluser]v4et[/eluser]
maybe I need all the routes inside my newcomer controller simply to resolve with other diferent name that is not necessarily a controller ,an example would be oldcomer thanks4 reading
[eluser]Tpojka[/eluser]
First post your controllers and views folder structure I.E. continue/fill up this order: Code: -application p.s. And use tags for your post formating. Thanks.
[eluser]v4et[/eluser]
-application --controllers ---config --views ---css --errors --helpers --hooks --js --language --libraries --models It is well explained before what I think I need is setting all the routes related to my newcomer controller to be intact in functionality but ressolve with a diferent name on the browser bar,yes whichever that dont need to be a controller name but in this case I need it to be oldcomer thank you Bring more commands like David mc pleaz
[eluser]Tpojka[/eluser]
I can't see structure you have left. If you see question marks in code I posted, please fill it so anyone can understand structure of your file/folder system. Seems there are some subfolders in controllers folder (with no files?) or even controllers folder inside views folder (from your post no.3) but really can't say that. CSS or JS folder should be outside application folder too. Also post URLs in manner Present state: Code: http://example.com/something1/something2 Code: http://example.com/something3/something4 Help us to help you. ![]() |
Welcome Guest, Not a member yet? Register Sign In |