Sitecore: How to access same field name in different sections

前端 未结 4 2318
后悔当初
后悔当初 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:51

    You can reference fields by their IDs:

    C#:

    string value = item["{00000000-0000-0000-000000000000}"]

    or

    Field field = item.Fields["{00000000-0000-0000-000000000000}"]

    I haven't tried this, but I think it'll work in XSLT as well:

提交回复
热议问题