1
votes

I am currently working on an Orchard module. This module contains an MVC application including the views. I would like to make the module as configurable as possible. One of the items that I would like the customer to configure is the way the MVC views from the module look. Part of it will be determined by the theme. But not everything. Consider the following scenario:

The module contains a view for placing an order. The view displays a form in ´normal view way´. That is field labels and input labels. But at the head of the form each customer must be able to define his own set of instructions to display. Or maybe the customer wants to put there a message for pointing the customer to some other actions.

In the most ideal way I would have a content page where the customer can put all kind of content and one specific block that is the result of the view of the module. Kind like a web part. I can´t find out if it is possible and how that is achieved.

Edit for clarification Module creates a page like this:

TITLE FORM

So both title and form are outputted by the module controller.

I have managed to create a layer with the condition that the url matches the page with my form.

I have added a HTML widget to this layer in the content zone with position 1 (tried 0 to).

However the pages looks like this:

  • TITLE
  • FORM
  • WIDGET

instead of

  • WIDGET
  • TITLE
  • FORM
1

1 Answers

1
votes

Returning a ShapeResult from your controller action will ensure that your view is themed and benefits from widgets, which are your "kind like a web part" thingies in Orchard.