Rendering content on a page other than in the Body.

Topics: Customizing Orchard, Writing modules, Writing themes
Nov 21, 2011 at 2:33 PM

Whats the best way to render content ( a content part, a list, a field ect.) somewhere on the page other than in the body? Without making it into a widget. For example, I create a custom content type, add a body, add a part, and the body gets rendered front and center on the page and the other fields get rendered just beneath the body. What if I want the fields to get rendered in Tripel third or second? But I don't want to drop them in a widget zone through the Admin UI. I just want them to appear in Tripel Third when I publish the page.

I hope this makes sense.

 

Oceantrain

Nov 21, 2011 at 3:55 PM

I already explained to you in the Branding thread why there's no easy way to do this: http://orchard.codeplex.com/discussions/279411

Now, the solution is to create your own ContentPartDriver and create the shapes you want and push them into Layout using a WorkContext. In short, it's not neat. But I've been working on some changes to Placement in one of my modules that might eventually allow these kind of cases.