How to set module to be Home Page via code

Topics: Writing modules
Jun 18, 2011 at 1:12 PM

Hello everyone,

I'm very new with orchard.

To learn orchard module development, I follow documentation and try to create commerce module.

The module consists of product part and product type which has product part.

During enable module, it will create admin and home menu for this module, "Commerce" and "Shop" respectively.

My questions are

  • How do I make this module to be home page during  enable module. In other word, I want Index method of
    the module's HomeController handle home url?
  • How do I get Shop menu in front end to be after home menu or register this module to home menu?

I also attach source code, please download it from the following link

Thank you.

Jun 21, 2011 at 5:58 AM

To take over the home page you need to implement a home page provider (look for IHomePageProvider). To create menu items, you need to implement a navigation provider.