Skip to content

Page URL customized per Storeview

There is a limitation in Magento 2 which we cannot overcome.

Our challenge is both o create Pages with dynamic URL per Storeview and, at the same time, ensure that Widget for CMS page link consider those customized URL on the webpage of each storeview. In summary, the challenge is to fully adapt the URL structure of Magento 2, to the Language of the visitor.

We are capable to insert blocks based on identifier, which contains the text and content in the language of the customer. At this level, the content of the block correctly reflects as per its StoreView assignment. Example with page “method-page”:

In order to reflect another URL per language, we can setup a URL redirect for each of those pages, and these pages are now accessible through the proper Localized URL. Example:

The problem starts when we want to create internal website crosslinks between pages. When we edit a page and we use the native M2 widget for CMS Page Link, this one doesn’t consider the established redirection, and present only the native URL. Therefore, we cannot established an internal site structure with the localized URL.For example, we have created a Menu page, which uses the native M2 Widget, to link to all the content pages in subrank:

The Link to the assigned page inside the “menu-page” is always the Generic URL and not the Localized URL. Whatever the Storeview, the link always points to “method-page”:

Instead of the desired URL localized:

Did anyone encountered the same problem and found a way to resolve it ? We browsed several extensions providers, M2 documentation and so on, but weren’t capable to find a workable solution. Maybe we will need to consider creating a customized Widget to cover this feature, but I would like to know if someone managed to identify a solution for this needs. Maybe Magento 2 will never consider to enable Localized URL structure, hence the question is worth it. This methodology of Localized URL is here to enable better SEO performance and penetration. Thanks.