razor - Orchard Shape Wrapper -


i'm following orchard documentation on wrappers couldn't wrap head around it. http://docs.orchardproject.net/documentation/understanding-placement-info#wrapper

according documentation, create wrapper.htmlcontent.cshtml , insert following in it.

<div class="htmlwrappercontent">     @model.html </div> 

but model.html? shape? know model shape itself. html not built-in property of shape or ishape figure must custom property done through code, example shapehelper.my_shape(html: "hello world")?


let's start beginning illustration of i'm trying achieve. have done following:

placement.info

<placement>     <place my_shape="content:before;wrapper=my_wrapper" /> </placement> 

my.shape.cshtml

<div class="myshape">     @* let's pretend line below prints "hello world" *@     @model.html </div> 

my.wrapper.cshtml

<div class="htmlwrappercontent">     @* should putting here? *@      @* have tried following *@      @* #1 *@     <div class="myshape">         @model.html     </div>     @* works why use wrapper this? might surround `my.shape.cshtml` `<div class="htmlwrappercontent"></div>` above. *@      @* #2 *@     @display(model)     @* doesn't work because circular reference. iis killed itself. *@      @* #3 *@     @displaychildren(model)     @* since `model._items` empty, doesn't print anything. *@ </div> 

my expectation of how page should like

<div class="htmlwrappercontent">     <div class="myshape">         hello world     </div> </div> 

so question is, how should my.wrapper.cshtml meet expectation?

shortly after posting question, found answer here

orchard - wrappers fields

so, wrapper should be

my.wrapper.cshtml

<div class="htmlwrappercontent">     @display(model.metadata.childcontent) </div> 

the orchard documentation use improvements.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -