English 中文(简体)
Creating a module with 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).

最佳回答

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.

问题回答

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 in 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 ..srcOrchard.WebModules folder

You can get more information here





相关问题
Working with modules in IntelliJ IDEA

As I understand, using modules allows us to control some dependencies. I mean that we can allow one module to interact with another one but not vise versa. We also can make some reusable things and ...

Module import path

I m unable to test-run a cssparser that I d like to use. test.py: from css.parse import parse data = """ em { padding: 2px; margin: 1em; border-width: medium; border-style: ...

Problem modulating action script project

I am refactoring a hugh action script solution in Flash builder (beta 2) using the flex 4 sdk. The project does NOT use the mx framework. What i want to have is: A big MAIN project several small ...

Test modules with Test::Unit

I encountered a problem when trying to test a module with Test::Unit. What I used to do is this: my_module.rb: class MyModule def my_func 5 # return some value end end test_my_module.rb: ...

Drupal section accessible by role

I need to limit access of content on Drupal site based on the Drupal User s Role. http://site.com/managers/intro http://site.com/managers/reviews http://site.com/managers/up-for-raises The ...

How to find where a function was imported from in Python?

I have a Python module with a function in it: == bar.py == def foo(): pass == EOF == And then I import it into the global namespace like so: from bar import * So now the function foo is ...

How to wire two modules in Verilog?

I have written two modules DLatch and RSLatch and i want to write verilog code to join those two.

热门标签