1

In our Sitecore 9.2.0 solution, I want to present data from a microservice to the editors. The editors should be able to browse and select one or more items from the microservice.

My initial idea was to create an index for the content from the microservice and then create a custom field that supports browsing and selecting content from the index.

Unfortunately, I have not found any information on how to create a Sitecore content field, that enables querying/select data from an index (SOLR/Azure). Does anyone have any experience with a scenario like this?

  • How many items we are talking about? You could implement your custom dataprovider and then use a multilist with search. Could it work for you? If yes I would provide a full answer. – Tamás Tárnok Sep 12 at 11:36
  • Potentially thousand of items. Items could be documents, images etc. Instead of querying the service directly, I imagine it would make sense to put in an index – Hos Sep 12 at 11:52
  • 1
    Maybe you can have a look at the iframe field type. This is a flexible field type and easy to implement. I wrote a blogpost about the basics few years ago: trnktms.com/2017/04/06/sitecore-iframe-field-basics. This does not solve your problem directly but can be a good starting point. – Tamás Tárnok Sep 12 at 12:14
  • As @Tamas suggested, use API directly and for better performance cache the response in API gateway. – Amit Kumar Sep 12 at 17:32
  • @TamásTárnok You definitely sent me in the right direction along with this blog post: sitecorejunkie.com/2016/05/07/…. If you write an answer along with a bit more details, I'll mark that as an answer – Hos Sep 13 at 18:09
1

For this purpose, I would use the iframe field type, which is IMO the most flexible solution for custom field types. You can find more information about the iframe field type here:

The advantege is that you have the full control of the presentation and stored data. With this solution you don't even need to create an index if the microservice contains search for the data you want to show.

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.