在 Sitecore 中创建新版本时复制字段
据我了解,Sitecore
中的 Unversioned
和 Shared
复选框允许我们跨语言和版本共享字段值。
我想知道是否有一个设置允许我在添加新语言版本时将所有字段从默认语言复制到新语言?
I understand that the Unversioned
and Shared
checkboxes in Sitecore
allow us to share a fields value across languages and versions.
I was wondering if there is a setting that will allow me to copy all fields from the default language into the new language when I add a new language version?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为默认情况下你不能这样做。您有多种选择,但主要的(IMO)是:
无需工作的方法是您使用“翻译”视图,它可以让您并排看到一个项目的两个版本,以便您可以调换一个进入另一个。复制过程是手动的,但至少您不必不断切换版本。
另一种(绝不是唯一的)方法是编写与 Sitecore API 交互的事件处理程序。让它响应版本创建的事件,并在正确的情况下,将另一个版本的值复制到新版本中。
I don't think you can do this by default. You have several options, but the main ones (IMO) are:
The no-work approach is that you use the "Translate" view, which lets you see two versions of an item side-by-side so you can transpose one into the other. The copying process is manual, but at least you don't have to constantly switch versions.
Another (and by no means the only other) approach is to write an event handler that interacts with the Sitecore API. Make it respond to a version created event and, in the correct circumstances, copy the values from another version into the new version.