kenticokentico-api

Returning data from an API as part of a Kentico query


We're currently using a basic repeater with a custom filter to display a paged list of results based on a handful of search criteria. This content is contained in a set pages (of the same page type), all of which are under a single parent page. This is working well but we now have a requirement to lookup a price for each property at runtime (the search criteria affects the price) and display that along with the data we're storing in Kentico currently.

I've got a fair bit of .NET experience but my Kentico experience is limited so I was wondering if anyone could point me toward the right approach.


Solution

  • If current implementation uses Kentico features like repeater, transformation, etc. I'd recommend considering custom macro method (https://docs.kentico.com/k12/macro-expressions/extending-the-macro-engine/registering-custom-macro-methods) or custom transformation method (https://docs.kentico.com/k12/developing-websites/loading-and-displaying-data-on-websites/writing-transformations/adding-custom-methods-to-transformations) depending on type of transformation you're currently using. Both approaches allow you to implement custom function that could be called from your transformation accepting parameters needed to calculate price for each property.

    Hope that helps.