如何为 sitecore/glassmapper 中的 TreeListEx 字段实现可编辑?
How to implement an editable for a TreeListEx field in sitecore/glassmapper?
我在 sitecore 中有一个字段是 TreeListEx。我需要在体验编辑器中支持这个字段。我正在使用 MVC 控制器渲染。
我很难找到任何可以指导我如何执行此操作的内容。 glass doc's don't mention TreeLists. I found this tutorial 但我无法将它谈到的某些项目与我的 sitecore 实现联系起来。具体来说,它谈到了:
In core database, under /sitecore/content/Applications/WebEdit/Edit
Frame Buttons, add your field, making a duplicate of the
/sitecore/content/Applications/WebEdit/Edit Frame Buttons/Default
folder for convenience. This will bring over with it the below items.
我没有这个设置...?它谈论的路径在我的站点核心中不存在。我猜这是旧版本(我使用的是 sitecore 8)
我 90% 确定我需要使用玻璃映射器 BeginEditFrame()
。这有一个过载:
public GlassEditFrame BeginEditFrame(string buttons, string dataSource);
但是似乎没有关于如何使用它的文档。我猜 datasource
会是我持有 TreeListEx 的字段,但 buttons
我不知道?
是否有人使用 MVC(glassmapper 或标准,我不介意)在体验编辑器中实现了 TreeListEx 字段?
如果这可能怎么办?
我想出了一个解决方法。 MVC/experience 编辑器中,sitecore 似乎不支持 TreeListEx(尽管这是一个核心功能)(很高兴在这里被驳斥)。
我的解决方法是将项目创建为使用它们的项目的子项(使 sitecore 设置更加笨拙但是...)
然后我可以这样使用开始编辑框:
@using (Html.BeginEditFrame(Model.Path))
{
foreach (var button in Model.Children)
{
<!--Use children here-->
}
}
注意:您需要在此处添加要添加的任何模板作为插入选项(项目模板 -> _standardValues -> 配置 -> 分配(插入选项菜单))
然后您就可以通过体验管理器添加项目:
我在 sitecore 中有一个字段是 TreeListEx。我需要在体验编辑器中支持这个字段。我正在使用 MVC 控制器渲染。
我很难找到任何可以指导我如何执行此操作的内容。 glass doc's don't mention TreeLists. I found this tutorial 但我无法将它谈到的某些项目与我的 sitecore 实现联系起来。具体来说,它谈到了:
In core database, under /sitecore/content/Applications/WebEdit/Edit Frame Buttons, add your field, making a duplicate of the /sitecore/content/Applications/WebEdit/Edit Frame Buttons/Default folder for convenience. This will bring over with it the below items.
我没有这个设置...?它谈论的路径在我的站点核心中不存在。我猜这是旧版本(我使用的是 sitecore 8)
我 90% 确定我需要使用玻璃映射器 BeginEditFrame()
。这有一个过载:
public GlassEditFrame BeginEditFrame(string buttons, string dataSource);
但是似乎没有关于如何使用它的文档。我猜 datasource
会是我持有 TreeListEx 的字段,但 buttons
我不知道?
是否有人使用 MVC(glassmapper 或标准,我不介意)在体验编辑器中实现了 TreeListEx 字段?
如果这可能怎么办?
我想出了一个解决方法。 MVC/experience 编辑器中,sitecore 似乎不支持 TreeListEx(尽管这是一个核心功能)(很高兴在这里被驳斥)。
我的解决方法是将项目创建为使用它们的项目的子项(使 sitecore 设置更加笨拙但是...)
然后我可以这样使用开始编辑框:
@using (Html.BeginEditFrame(Model.Path))
{
foreach (var button in Model.Children)
{
<!--Use children here-->
}
}
注意:您需要在此处添加要添加的任何模板作为插入选项(项目模板 -> _standardValues -> 配置 -> 分配(插入选项菜单))
然后您就可以通过体验管理器添加项目: