N2 CMS Asp.Net MVC 3 Razor ControlPanel HtmlHelper
我刚刚将 N2 CMS 连接到我现有的 MVC 3 Razor 站点。到目前为止,没有问题,内容是可编辑的等。我唯一缺少的是如何在实际站点上显示 N2 控制面板,而不是转到实时站点的 /N2/ 文件夹并在那里编辑内容。
N2 CMS 的首席开发人员 Libardo 在这里暗示了 HtmlHelper http://n2cms.codeplex.com/discussions /232192 但我在源代码中找不到它。我可能会自己推出,但只是想知道是否有人已经这样做了,或者知道帮助程序的实际 N2 版本在哪里。
I just bolted on the N2 CMS to my existing MVC 3 Razor site. So far no problems, things are editable etc. The only thing I'm missing is how to show the N2 control panel on the actual site rather than going to the /N2/ folder of the live site and editing things there.
Libardo, the lead developer of the N2 CMS hints at an HtmlHelper here http://n2cms.codeplex.com/discussions/232192 but I can't find it anywhere in the source code. I could likely roll my own but was just wondering if someone already did this or knows where the actual N2 version of the helper is.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我在邮件列表上关注的讨论,HtmlHelper 尚未出现在主要的 N2 版本中,而是位于 github 上的另一个分支中。
如果您等不及将其纳入主构建,您可以尝试将控件放入 ascx 部分中,并使用 Razor 视图中的 RenderPartial 来渲染它。我不能说我已经尝试过这个,但我很想知道它是否有效!
From discussions I've been following on the mailing list the HtmlHelper isn't in the main N2 build yet, but on another branch on github.
If you can't wait until this makes it into the main build, you could try putting the control in an ascx partial and using RenderPartial from your Razor views to render it. I can't say I've tried this, but I'd be interested to hear if it works!