Translatable external URL
Opened this issue · 5 comments
CONTEXT:
multilanguage website managed with Rainlab.Translate
NEEDS:
menu items liked to external URL could have different href depending on current locale:
- IT => google.it
- ES => google.es
Simply add external_url
and url
to $translatable
fields
oc-menumanager-plugin/models/Menu.php
Line 29 in d7b9ccc
url
attribute plus is_external
flag).
Do you think you can support that?
In the meanwhile, the only workaround that I see is to use a CMS page to manage a "redirect router" somehow. Any other ideas?
I had the same problem and to fix it I had to fork the plugin, add a field for internal_url and external_url and change the way the $this->url
logic works. I don't think there are other ways around this issue. You have to have a field for both internal and external as far as I know.
@osmanzeki do you have considered to place a PR with your changes?
@matteotrubini I considered it but as things sometimes are I had a deadline to meet and did not attempt a backward compatible approach. As such I had to add columns and change the way the URL is handled overall. I'll see if I have time to attempt an api compatible PR when I have a minute to work on this.
@osmanzeki got it, I've the same troubles 😄
@benfreke a migration that update the table schema and reorganize old data would be acceptable by your POV? It will ensure BC.
@matteotrubini yes, as long as there is no breaking changes I'm ok