November Happy Hour will be moved to Thursday December 5th.

Changing model property source

Vote:
 

I'm trying to change model property data source. By default it is obtained from EPI tables by DefaultContentProvider class and with this approach we got some efficiency problems. 
I found two possible solutions (none of them worked so far):
1. In EditorDescriptor fetch data from external source and pass it through metadata. Hack dojo widgets to handle data from metadata. Ommit parameters that come to _setValueAttr (method that handles input change) and set there values from metadata. This failed because I'm blocking user inputs by this.

  
2. Replace DefaultContentProvider with custom one created by me. This provider would have logic to hadle custom properties. This failed because I cannot replace DefaultContentProvider.


There are also some AOP technics but really I don't want to hack EPI so much.

Any thoughts how this can be done?

#179836
Jun 22, 2017 17:45
Vote:
 

How about implementing a ContentProvider? This is a common way to read information from an external system and display them as content.

Read more about content providers: https://world.episerver.com/documentation/developer-guides/CMS/Content/Content-providers/

Another common approach is to have a scheduled job that reads your external system and creates content in Episerver. This way the content will still be available even if the connection to your external system fails.

#180080
Jun 29, 2017 12:53
* 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.