Configure __Renderings field not passed as a result of Sitecore?

Does anyone have experience setting up the __Renderings field in Sitecore for sharing? We create a multilingual multilingual solution and should (layouts) be different in different languages. For example, a site in English may have a sublayer that does not have the Swedish version of the same element, and all presentation components do not always have the same data source for different languages.

A somewhat easy solution for this would be to simply remove the "shared" in the __Renderings field in /sitecore/templates/System/Templates/Sections/Layout template , but does it have any other consequences? Or is there a better way to handle this requirement?

+6
source share
4 answers

My own preferences, when you need to exchange visual elements based on something like language, country of origin, etc., should use Sitecore's personalization rules editing to replace data sources and change the presentation in this way. This is not related to changing the default behavior of Sitecore and allows you to use the built-in Sitecore feature.

If your different “sublimates” are really just data sources that are used by different personalization rules, you can configure all of this with OMS / DMS and rely on the Sitecore engine to present the components you need based on the current state. For performance, it is best to use the latest version of DMS (I believe update 6 is now updated to 5).

+5
source

Changing Sitecore's default behavior in this way is usually not a good idea. This is not transparent to other people who may be working with the system in the future, and this may lead to unexpected results.

Imo, it’s better to make a switch inside the (under) layouts so that it loads different files based on the current language.

As for the investigation. It will work as you expect when the _Renderings field is not split. You can set different presentation data for each language version. The consequence of this is that now you have to install it for each language version ... so that it will be less easy to manage.

+2
source

Instead, I would use sitecore devices. For each language you can define a site, and each site can have its own device. This will work ready if you have one domain name for each language (www.site.com, www.site.de, www.site.fr, etc.)

If you have one site (one host name) for all languages, you can switch devices using the httpRequestBegin pipeline processor.

This article http://briancaos.wordpress.com/2012/04/12/identifying-mobile-devices-in-sitecore/ describes how to identify mobile devices. It’s easy to rewrite the logic for switching devices depending on the language.

When you define different devices for each language, you simply place the images on a device that matches your language. And you still have the option of a backup device for all those pages where all the visualizations are the same.

Modifying Sitecore's default behavior may work, but using and extending the Sitecore platform is the best way forward.

+1
source

We really did it, and for the most part there are few side effects. In fact, this is the only way you are going to get the workflow in __Renderings changes. We will combine it with Partial Language Fallback so that languages ​​can inherit meaning from English. However, be careful as if the object was cloned, it will always pull its default value from the clone first, not the standard values ​​/ reserve.

+1
source

Source: https://habr.com/ru/post/923462/


All Articles