1

We thought that it would not be a good idea to localize the global pages at country (080 or 090) publication level just to translate the URLs thus We used deployer extension to translate the URLs. When a page is published, deployed extension read the translated URL from component metadata and set that URL for the published page.

But the problem with this set up is that View on Site feature in CMS does not open the translated URL, as this is at CM side and it is not aware of the translated URL.

What is the best solution here so that View on site can also open the translated URL.

Thanks

4
  • Maybe be better to leave the URL alone during publishing and handle this via your web application. Maybe have somekind of mapping file your web app can use convert a translated URL back to the published one.
    – Neil
    Jul 6, 2020 at 9:29
  • Yep, I agree with Neil's approach. Or you could write a GUI Extension to extend/override the default 'View on Site' functionality - but this wouldn't be trivial. Also worth noting that GUI Extensions aren't supported in the new Tridion Sites 9.5 UI. Jul 6, 2020 at 10:01
  • Thanks for the response. If I understand your answer correctly, you said that keep the URLs in english and then using mapping file to generate the translated URLs (like in navigation etc.). But then Tridion component linking would resolve to English URL only, and then this mapping file can do a redirect. But then there would be many redirects and those may hit SEO.
    – Rites
    Jul 6, 2020 at 11:33
  • You can do rewrite instead of redirect depending upon web stack.
    – Neil
    Jul 7, 2020 at 13:11

1 Answer 1

2

You can customize the URL used by the View on Site feature by implementing an event handler for the GetPublishUrl event.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.