1

我目前正在编写自定义 DataProvider。使用集成外部数据文档。

我已经设法在 Sitecore 后端显示外部数据。但是,每当我尝试查看我创建的项目中的数据时,都会出现错误

Null ids are not allowed. <br> Parameter name: displayName

DataProvider关于如何在 Sitecore 开发者网络上创建自定义的主题似乎很少见。

他们网站上的示例似乎只显示了如何将单个项目导入静态数据库。但是,我只是想将一些项目合并到层次结构中,但找不到任何有用的文档。

4

2 回答 2

4

似乎您应该返回 ID 的方法之一没有。它可能是 GetChildIds 和/或 GetParentId。

Nick Wesselman 写了一篇关于它收集所有信息的好文章,包括市场上的一个示例。我认为这是你最好的开始。你可以在这里阅读它。

于 2013-10-29T07:55:34.613 回答
1

Turns out I needed to include at the very least, the Fields->Section->Template in the GetParent method. To be on the safe side I included the Fields/Sections/Templates into my implementations of

  • GetChildIDs
  • GetItemDefinition
  • GetParentID

It wasn't obvious that this was the case, since I had in fact implemented the GetTemplates method correctly, and I had expected that should be enough.

于 2013-10-29T08:02:29.440 回答