I hooked up into the content.saveContent event. I want to save the entry content into a different application. Is there a way to retrieve the content as a Json (Or something more friendly). I think do $event->params['content']->title is now the best option.


$event->params['content] will return a ContentModel object.

You can either access specific fields directly, like you found, or loop through them all with ->getAttributes() grabbing the ones you want to save externally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.