Search code examples
asp.netmoduleorchardcms

How do I get a ContentItem's content in Orchard?


I have instance of ContentItem and I'd like to get the contents of it. How do I do this?


Solution

  • That is extremely vague. I'll take an example at random:

    contentItem.As<BodyPart>().Text
    

    will get you the contents of the body part if it has one.