使用科学项目套接字和连接器手动渲染果园中的项目
在我的项目中,我覆盖了小部件级别的显示,以便精确控制正在生成的标记。我现在遇到的问题是,我无法弄清楚如何渲染使用 Socket -> 连接的项目。连接器-> Socket(为了实现项目的一对多关系)
http://scienceproject.codeplex.com /wikipage?title=Mechanics
如果我插入默认的小部件渲染线,
@Display(Model.Content)
我可以使用形状跟踪器看到套接字的项目正在使用以下视图渲染,
~/Modules/Downplay.Mechanics/Views/Socket.cshtml
我想要做的是手动执行此操作。我已经计算出它的
Model.Content.ContentItem.MyType.ContentItem.Parts[8]
类型为 Downplay.Mechanics.Models.SocketsPart
但 Connectors
为空,我看不到任何其他对套接字的引用。谁能告诉我如何访问连接的套接字?
In my project I have overridden the display at the widget level in order to precisely control the markup being produced. The problem I have now is that I can't work out how to render items which are connected using Socket -> Connector -> Socket (in order to achieve a 1-many relationship of items)
http://scienceproject.codeplex.com/wikipage?title=Mechanics
If I insert the default Widget rendering line
@Display(Model.Content)
I can see using the shape tracer that items of the Sockets are being rendered using the following View
~/Modules/Downplay.Mechanics/Views/Socket.cshtml
What I want to be able to do is do this manually. I have worked out that
Model.Content.ContentItem.MyType.ContentItem.Parts[8]
is of type Downplay.Mechanics.Models.SocketsPart
but Connectors
is null and I can't see any other reference to Sockets. Can anyone tell me how I would access the connected sockets?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案是模型包含一个项目列表,如果对这些项目进行迭代,我需要的项目就是具有 ConnectorType 集的项目。
The answer was that the model included a list of items, if these were iterated through, the items i needed were the items with a ConnectorType set.