Topic: Re-routing/ mapping & frontend languages
I haven't been able to dedicate as much time as i'd like so this has been a bit delayed.
Features include silent routing and redirects.
Been a little delayed on this one but its nearly done so soon!
My latest plugin will require some core file changes which I will propose for Monstra, but for the time being I will have the plugin auto replace and backup the old ones, which I think is the best solution or would manually changing be better?
As I have been adjusting the Uri class I thought I'd make the site multi language aware as I have seen this requested in other posts. This means that urls like www.mysite.com/ru/blog will give the Russian version if you are using I18n. If using this feature you will need to adjust links to carry over the lang preference, I have created the function Site::langUrl that outputs if set and nothing if not so links can be easily changed e.g:
Site::url . DS . Site::langUrl . rest-of-path Note that a trailing slash will be automatically added if needed allowing for a none value.
The language preference is stored in a cookie, so will be active on next visit also.
Changing language is as simple as www.mysite.com/en (note that this is frontend only)
Re-routing/ mapping, will over-ride any command arg and redirect. i.e the first /arg after the url
You will be able to do things such as:
www.mysite.com/shortlink -> www.mysite.com/blog/1/any/other/args/you/like
www.mysite.com/news -> www.mysite.com/blog
This will allow you to maintain eternal links when you site structure changes and allow for short linking as well.
Hope that all sounds good. Let me know if anyone has suggestions as I progress.