Sitecore: How to access same field name in different sections

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

    item.Fields.Where(field => field.Section.ToUpper() == "META DATA" && 
                               field.DisplayName.ToUpper() == "TITLE").First().Value;
    

提交回复
热议问题