Using shapes as Html helpers in Orchard

发布于:
Orchard CMS

Orchard shapes are the basic building block of the whole rendered UI. They are ordinary, although dynamically discovered and created by Orchard framework, Razor (.cshtml) view files. One of the coolest (and also the one that generates most of the beginners’ problems) thing about Orchard is it’s flexible nature by extensive use of C# 4.0 dynamic objects.

Suppose you have the following line of code:

@Display(New.MyShape(Text: “someText”, SomeProperty: someObject))