Episerver Find block content

Vote:
 

We have a block that retrieves content from another website.

Ideally, we would like that content to be indexed against the page that contains the block, but I'm not sure how this is done?

I could also remove the block and have the page type retrieve the external content if that is easier.

Any ideas? 

Thanks,

Paul

#173785
Jan 10, 2017 3:36
Vote:
 

I would probably create a separate method on the page type that returns the content from external source. Then add to index by using client convention like

client.Conventions.ForInstancesOf<YourPageType>()
    .IncludeField(x => x.GetExternalData());

Read more on 

http://world.episerver.com/documentation/developer-guides/find/NET-Client-API/Customizing-serialization/Including-fields/

#173788
Jan 10, 2017 7:41
Vote:
 

Thanks Daniel much better approach.

#173839
Jan 10, 2017 22:17
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.