문제

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");
도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top