我可以将页面插入 Orchard CMS 的视图中吗?
我要求在标题下方、视图内容上方有一个“可编辑”区域。我有几个页面需要执行此操作。
有没有办法按名称将页面插入视图中?有更好的方法吗?
I have requirements to have an "Editable" region underneath the header, but above the content of views. I have several pages that I need to do this.
Is there are way to insert a Page by name into a view? Is there a better approach?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要的看起来很像一个小部件:创建一个 html 小部件,将其放在适合您放置的适当区域中,并放在适当的层中,使其仅出现在相关页面中(如果有,不要害怕创建自定义层)你需要)。您甚至不需要编写任何代码来实现这一点!
在orchard 文档中了解有关管理小部件的信息。
What you need looks a lot like a widget: create an html widget, put it in the appropriate zone for your placement and in the appropriate layer for it to appear only in the relevant pages (don't be afraid to create a custom layer if you need to). You won't even need to write any code to achieve this!
Read about managing widgets in the orchard documentation.