Custom Content Wrapper - Orchard CMS

Using the Orchard administrator, I created a new piece of content called "Spotlight Wrapper" with three HTML fields. Then I created a content type called Template 1 and assigned it a Spotlight Wrapper . Then I created a new content element, Template 1, called Home. Then I created a Fileds_Contrib.Html-Spotlight Wrapper.cshtml file to wrap each HTML field in a “Spotlight Wrapper”, and that works. I added:

<Place Parts_SpotlightWrapper="Content:before;Wrapper=Parts_SpotlightWrapper" />

And created:

Views\Parts.SpotlightWrapper.cshtml

trying to wrap all of the Spotlight Wrapper content, but can't make it work?

+3
source share
1

, , , , Parts_SpotlightWrapper . Wrappers - Razor (cshtml), .

, .cshtml (, MyWrapper.cshtml), HTML- :

<Place Parts_SpotlightWrapper="Content:before;Wrapper=MyWrapper" />

, . :

<ul>
    @Display(Model.Child)
</ul>

Btw - , Orchard.Widgets. Widget.Wrapper Widget.ControlWrapper, . Placement.info( ), Shapes.cs, . Placement.info .

+2

All Articles