In Sitecore, when adding a field to a template, there's a checkbox called “shared”. What's it for?

早过忘川 提交于 2019-12-01 15:51:09

Yes, that's correct - the same across versions and languages of an item. Here the quote about Shared from SDN (though for 5.3, still valid for 6.x):

When this checkbox is set, the Field in question will have the same value for all versions of the parent Item. When the Shared property is set, changes to the Field value in any language or numbered version of the Item will be reflected in all other languages and versions.

And I can foresee your next question: if both Shared and Unversioned are checked, the field is Shared. You can read more about how it is stored internally here on my blog.

Hope this helps.

I would strongly recommend not using shared fields as much as possible. One of the main reasons is that they are not subject to workflow. In other words, if you change a value on a shared field, this change will be published even if the item is still in workflow. If you need field value fallback, handle it on the rendering level.

Often, you'll see shared fields for Image field types. For example, a picture of an apple isn't going to be translated. It makes sense that the apple appears across all language versions, and hence the need to make this image field shared. When in Content Editor, content authors will see the [shared] text next to field title.

Refer to Yan's blog about using Siecore Rocks as this new tool helps clear up the confusion.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!