craftcms / element-api

Create a JSON API/Feed for your elements in Craft.
MIT License
498 stars 57 forks source link

Update README.md #21

Closed gui-gui closed 7 years ago

gui-gui commented 8 years ago

I had some trouble using the setup example on a freshly installed craft due to the lack of ->getParsedContent() method being applied to parse the body content, which, in the provided stock news section, is a rich text field. Without the getParsedContent you only get a empty object for body in your api endpoint.

Also removed both 'summary' => $entry.summary, since the default news does not seem to have one.

Just thought it might help someone that tries this sample code. :)