Sitecore: How to access same field name in different sections

前端 未结 4 2309
后悔当初
后悔当初 2021-02-14 11:20

I have data template dt1 in sitecore that has the field \"header\" in section \"data\". I also have data template dt2 that has the field \"header\" in section \"portal\" Finally

4条回答
  •  被撕碎了的回忆
    2021-02-14 11:34

    You can't.

    And frankly I don't know of any supported way to do it from .NET either.

    This, straight out of the Data Definition Reference, section 2.1.1

    2.1.1 Data Template Fields

    A data template field defines the user interface control and other properties that influence how the field behaves in the Content Editor and Page Editor. For more information about fields, see Chapter 4, The Template Field.

    Note When defining field names, ensure that they are unique even between field sections. Both XSLT and .NET code use field names alone, without reference to sections, to extract content from fields.

提交回复
热议问题