We have a requirement to show on the article page a list of articles which have the same topic and author as the current article i.e. "Related articles". I have two ideas about how that can be implemented:
- create a custom rendering contents resolver which would pass a whole list of articles existing in Sitecore (it might be around 40) and then it will get filtered according to topic/author on react side. (or maybe it's actually better to filter in the resolver too and only pass the "related" data to react side?)
- make an api call to backend: create search context and filter the items there & pass the filtered output to the react app
Both seem to be reasonable enough - and it seems like it would be more fun to try the first approach but I'm hesitant because of the large json output for the layout service. What considerations should I take into account to choose between these two options? And... maybe there is a better way I don't know of? Thank you