override widget rendering

Jan 10, 2011 at 6:08 PM
Edited Jan 11, 2011 at 2:16 PM

I'm using @Display(Model.AsideFirst) to paste the contents of the AsideFirst zone (as an example).

 

The thing is, I need to customize the html rendered on both header and content area of existing widgets (even different rendering depending on the zone).

 

I think this is rendered through Widget.Wrapper.cshtml but I wanted something simpler like just replacing @Display(Model.Zone) with something like

<div>

@Display(Model.AsideFirst.Widget.Header)

</div>

<div>

@Display(Model.AsideFirst.Widget.Content)

</div>

Is this possible? If not, how exactly can I paste a customized Widget.Wrapper.cshtml in my theme to enable overriding?

 

update: found out placement folder of Widget.Wrapper.cshtml in theme is theme_name\views

update: file is located in C:\inetpub\wwwroot\Orchard0.9.253\Modules\Orchard.Widgets\Views

<div class="MySpecificWidgetWrapperClass">

@Display(Model.AsideFirst)

</div>

this and overriding the widget wrapper solves my issue

thanks anyway

Coordinator
Jan 11, 2011 at 12:24 AM

Zones are shapes, so you can override their templates like with any shape.