The first one is a mistake and should be replaced by Model.Header.Add(New.User(), "10");
.
New.ShapeName()
instantiates a new shape but does not render it.
@Display.ShapeName()
instantiates and renders a new shape.
Question
What is the difference between Display.User() and New.User() in Orchard templates?
I see this line of razor code in Core\Shapes\Views\Layout.cshtml:
Model.Header.Add(Display.User(), "10");
Where as there is this line of code in Themes\TheThemeMachine\Views\Layout.cshtml:
WorkContext.Layout.Footer.Add(New.User(), "10");
La solution
The first one is a mistake and should be replaced by Model.Header.Add(New.User(), "10");
.
New.ShapeName()
instantiates a new shape but does not render it.
@Display.ShapeName()
instantiates and renders a new shape.