Get content from widgets on DocumentEvents.GetContent.Execute

Tom Troughton asked on October 7, 2015 17:42

Does anyone know how I might get access to the widgets added to a page in a handler for the DocumentEvents.GetContent.Execute event?

I'm hoping to read the supplied widget parameters in order to add additional content to my smart search index.

I've found how to access the template's web parts and expose those properties, but that's template-level. I'm hoping for document-level access to widgets.

Thanks in advance.

Correct Answer

Tom Troughton answered on October 7, 2015 18:27

I believe I've found the answer to my question. If I make my widget implement CMSAbstractEditableWebPart and override LoadContent and GetContent then I can set its content to be indexed automatically. Let me know if there's a preferred approach.

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.