Can I display a widget anywhere by code without insert it into a Layout Zone from admin panel?

Topics: Customizing Orchard, Writing modules
Jun 19, 2013 at 9:15 AM
All I want to do is something like:
<div id="section1">@Display(WidgetName: "contactus")</div>
<div id="section2">@Display(WidgetName: "maplocation")</div>
The syntax does not have to be the same but I think you'll get what i'm trying to achieve. Like @Html.RenderPartial("action", "controller") in the traditional .NET MVC but render a widget instead.

Thanks
Developer
Jun 19, 2013 at 3:24 PM
Nope, widgets are not a replacement for partials. Shapes are. You can eg. do @Display.User() or @Display.WhateverRazorFileYouHave().