【发布时间】:2017-09-13 04:42:53
【问题描述】:
我需要从RenderingID 获取.ascx 用户控制文件系统路径。
下面的代码为我提供了一个项目的渲染列表,但它不会在RenderingReference 数据对象的任何属性中返回用户控件的路径。
public RenderingReference[] GetListOfSublayouts(Sitecore.Data.ID itemId)
{
Sitecore.Layouts.RenderingReference[] renderings = null;
Item item = Sitecore.Context.Database.GetItem(Sitecore.Data.ID.Parse(itemId));
if (item != null)
{
renderings = item.Visualization.GetRenderings(Sitecore.Context.Device, true);
}
return renderings;
}
【问题讨论】:
标签: c# asp.net api content-management-system sitecore