Put your display template directly inside Views
folder (/Views/Parts.SubscribersForm.cshtml
), not inside DisplayTemplates
. Orchard, by convention, scans Views
folders only when looking for shape templates. That EditorTemplates
subfolder, on the other hand, holds templates for part editors, ie. those shapes returned from driver Editor
methods.
What is that dynamic shapeHelper
thing? In short - it's a shape factory. When you call eg. shapeHelper.SomeShape(Foo: 1, Bar: "baz")
, it returns a shape object that corresponds to a SomeShape.cshtml
template, with a dynamic model containing properties Foo
and Bar
. That template has to reside somewhere in Views
folder of a module or theme. That's more or less all the magic.
If you want to understand shapes more - it's a good starting point: http://docs.orchardproject.net/Documentation/Accessing-and-rendering-shapes.