08-05-2010, 01:59 AM
[eluser]JanDoToDo[/eluser]
Hey guys,
Am trying to do this:
/communities/(variable method)/(variable function)
What is the best way to do this? At the minute I am remapping everything in the controller so that if the method exists it goes to it but if it doesnt it goes to a standard method.
However, I find that it re routes to the method but then doesnt check to see if the function exists or not so i do it manually. However this url would not show an error page:
/communities/test_community/view/test2/test3/test4.
as it is rerouting and then carrying on as normal.
So basically i have this:
A community controller.
There are about 4-5 stanard methods, e.g. home, overview etc. and
For any community that exists, it is accessed using: /communities/(community title)
For each community there are various actions so e.g. view, members, stats, alerts etc e.g.
/communities/codeigniter/stats or /communities/the-uk-massive/join
What is the best way to accomplish this? As i said, i am currently remapping everything and testing to see if the method exists as a function or not. if it doesnt it goes to the "load community" method. Is this the best way?
Hey guys,
Am trying to do this:
/communities/(variable method)/(variable function)
What is the best way to do this? At the minute I am remapping everything in the controller so that if the method exists it goes to it but if it doesnt it goes to a standard method.
However, I find that it re routes to the method but then doesnt check to see if the function exists or not so i do it manually. However this url would not show an error page:
/communities/test_community/view/test2/test3/test4.
as it is rerouting and then carrying on as normal.
So basically i have this:
A community controller.
There are about 4-5 stanard methods, e.g. home, overview etc. and
For any community that exists, it is accessed using: /communities/(community title)
For each community there are various actions so e.g. view, members, stats, alerts etc e.g.
/communities/codeigniter/stats or /communities/the-uk-massive/join
What is the best way to accomplish this? As i said, i am currently remapping everything and testing to see if the method exists as a function or not. if it doesnt it goes to the "load community" method. Is this the best way?