使用 Orchard 创建模块

发布于 2024-09-08 00:18:54 字数 515 浏览 0 评论 0原文

“创建模块”演练for Orchard 不适用于 Orchard Mercurial 存储库 头部的代码默认或开发分支。有人知道如何使用 3 月份 0.1 版本之后的版本创建新的 Orchard 模块吗?

如果源代码中有一个更新的示例模块,那就太好了,但除了内置模块之外,我看不到任何其他模块,这些模块不与主菜单相关联,而且都非常复杂 - 一个“你好世界” ' 一个会好得多!

我意识到 Orchard 尚未正式发布,但我正在尝试将它用于我刚刚开始的新项目的简单 CMS(希望我能够在发布时使其与更高版本的 Orchard 一起使用) )。

The 'create a module' walkthrough for Orchard doesn't work with the code in the Orchard Mercurial repository at the head of the default or dev branches. Anyone know how I can create a new Orchard module with something later than the 0.1 release from March?

It'd be great if there was an updated sample module available in the source somewhere, but I can't see any apart from the builtin modules, which don't tie into the main menu and are all very complicated - a 'hello world' one would be much better!

I realise Orchard's not officially released, yet, but I'm trying to use it for a simple CMS for a new project I'm just starting (hopefully I'd be able to get it working with a later version of Orchard by release time).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

北凤男飞 2024-09-15 00:18:54

找到了。有一个新的配置设置,可让您打开和关闭模块。现在默认禁用模块。

您可以在管理>中打开模块特征。

Found it. There's a new configuration setting that lets you turn on and off modules. Modules are now disabled by default.

You can turn modules on in admin > features.

不必在意 2024-09-15 00:18:54

8 年后,我们使用 Orchard 1.10.x,创建模块的方法之一是通过命令行。步骤如下:

  1. 导航到 orchard 解决方案的 \bin 文件夹。
  2. 在地址栏中输入cmd,这将打开一个命令行窗口
  3. 在cmd窗口中输入orchard,这将初始化Orchard会话
  4. 然后输入feature enable Orchard.CodeGeneration< /kbd>,这将启用代码生成模块,因为默认情况下它是禁用的
  5. 最后输入 codegen module LearnOrchard,这将创建一个新模块并将其放置在您的 ..\src\Orchard.Web\Modules 中您

可以在此处

After 8 years we are using Orchard 1.10.x and one of the ways to create a module is via command line. Here are the steps:

  1. Navigate to the \bin folder of your orchard solution.
  2. In the address bar type cmd which will open a command line window
  3. In the cmd window type orchard, this will initialize Orchard Sessions
  4. Then type feature enable Orchard.CodeGeneration, this will enable Code Generation module since it is disabled by default
  5. Lastly enter codegen module LearnOrchard, this will create a new Module and places it in your ..\src\Orchard.Web\Modules folder

You can get more information here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文