显示在cshtml中选择的sitecore treelist

时间:2018-03-05 19:25:45

标签: sitecore sitecore-mvc

Source Image

在cshtml文件中显示所选值 写了这段代码,但它没有用

    List<Item> lstWellnessName = null;

     Sitecore.Data.Fields.MultilistField WellnessList = 
      WellnessItem.Fields["Property Wellness"];

        if (WellnessList != null && WellnessList.TargetIDs != null)
        {
            Item[] result = WellnessList.GetItems();
            lstWellnessName = result.ToList();
        }

0 个答案:

没有答案