I need to create a “custom” web page in Orchard. As I understand it, below are the steps I need to take to do so. Before I go down this somewhat lengthy process, are there any steps I’m missing or that I can skip?
- Create a model
- Create a content part and content part record which use the above model
- Create a driver which implements the Display method which returns the “shape” of the content part
- Create a shape template to render the shape returned from the above driver
- Create a content type which holds the content part
- Create a page which holds the content type
- Add the page to my site
This page is “custom”, in the sense that it needs to pull data from a web service and display it in an interactive way. When the user makes changes, those changes will need to be sent back to the web service.
Those are really steps for creating a content item. You would want to create a content item if your page should be treated as content – e.g. administrators can create, edit, publish, unpublish, and finally delete your page.
If you just want to create a simple page, then there is nothing to stop you from creating your own ASP MVC controller. You can define routes for it using Orchard’s routing, and if you decorate it with a
[Themed]attribute, it will even inherit the site’s theme.