Sitecore: How to access same field name in different sections

前端 未结 4 1390
孤城傲影
孤城傲影 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条回答
  •  爱一瞬间的悲伤
    2021-02-14 11:32

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

提交回复
热议问题