Trying to display .Parts.Common.Body body in details page in code. Help please!

Topics: Customizing Orchard, General
Jun 24, 2013 at 1:12 PM
Hi there

I am trying to display the body field in the property details page. In the placement I have hidden this by adding <Place Parts_Common_Body="-" /> which works, however, in the Content-Property.Details.cshtml page I want to display this in the code as I have a tabbed display area. this woks great for other fields and I have code such as
@if(Model.ContentItem.Property.Location.Value != null) {

     <p>No location details available for this property.</p>
but for the body part I am not sure how to reference the value.

I have been trying @Model.Parts.Common.Body but it dos not work.
Please can someone help me with this?

Thanks, Kirsty
Jun 24, 2013 at 3:06 PM
If anyone is trying to do this, I managed to get it to work by writing @Model.ContentItem.BodyPart.Text, just about+ to work out some code to strip out the <p> and </p> tags.