Jake Bunce
Well-known member
As the title says...
For example, this URL:
http://yoursite.com/community/forums/name-here.1/
Is changed to this:
http://yoursite.com/community/view/name-here.1/
This is a popular request from people who install their forum into a directory named forums/ because you get a doubling in the URL like this (directory + route):
http://yoursite.com/forums/forums/name-here.1/
It is strictly a matter of URL beautification. The double "forums/forums" is functionally OK but some people don't like the way it looks and would prefer to change it which is what this addon does.
_____
Note - this addon creates a new route called "view" which simply points to the handler for the default "forums" route. But all templates and other code employing link syntax can and should continue to use the "forums" route internally. This addon intercepts all "forums" links and changes them to "view" so you don't have to change any links in the templates and files. This also means you can disable or uninstall this addon and all links will revert back to "forums".
Redirects are automatically handled as well. If you install this addon and then try to access a "forums" link it will redirect you to "view". But the redirect doesn't work going backwards if you uninstall this addon. If you wish to preserve "view" links in the event of uninstalling this addon then you can enable debug mode and recreate the "view" route:
Admin CP -> Development -> Route Prefixes -> Create New Route Prefix
I tested this in both 1.0.x and 1.1.x
For example, this URL:
http://yoursite.com/community/forums/name-here.1/
Is changed to this:
http://yoursite.com/community/view/name-here.1/
This is a popular request from people who install their forum into a directory named forums/ because you get a doubling in the URL like this (directory + route):
http://yoursite.com/forums/forums/name-here.1/
It is strictly a matter of URL beautification. The double "forums/forums" is functionally OK but some people don't like the way it looks and would prefer to change it which is what this addon does.
_____
Note - this addon creates a new route called "view" which simply points to the handler for the default "forums" route. But all templates and other code employing link syntax can and should continue to use the "forums" route internally. This addon intercepts all "forums" links and changes them to "view" so you don't have to change any links in the templates and files. This also means you can disable or uninstall this addon and all links will revert back to "forums".
Redirects are automatically handled as well. If you install this addon and then try to access a "forums" link it will redirect you to "view". But the redirect doesn't work going backwards if you uninstall this addon. If you wish to preserve "view" links in the event of uninstalling this addon then you can enable debug mode and recreate the "view" route:
Admin CP -> Development -> Route Prefixes -> Create New Route Prefix
I tested this in both 1.0.x and 1.1.x