Sitecore: How to access same field name in different sections

前端 未结 4 1416
孤城傲影
孤城傲影 2021-02-14 11:17

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条回答
  •  旧时难觅i
    2021-02-14 11:30

    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:

提交回复
热议问题