Display json with Custom response Repeater

Vuthy Sok asked on May 28, 2018 08:57

I am new Kentico I would like to display json with Custom response Repeater Webpart . I have found webpart from this site https://www.milanlund.com/blog/create-json-api-endpoints but after install Webpart not working with Kentico 11.

Could anyone help how to fixing a issue?

Thanks, Vuthy

Correct Answer

Dragoljub Ilic answered on May 28, 2018 17:02

Hi,

I just installed that webpart and the main reason why it's not working is because 'LoadTransformation' is moved from CMSDataProperties into TransformationHelper in k11. I imported web part (followed instructions from blog that you shared here) and on line 212, you should change this:

br.ItemTemplate = CMSDataProperties.LoadTransformation(this, Transformation);

with

br.ItemTemplate = TransformationHelper.LoadTransformation(this, Transformation);

After that, rebuild solution, solve errors in console(in my case I had some problems with CustomResponseRepeater.ascx.designer.cs, but I solved in the way that I created new clean .ascx control and then just copied code from imported custom webpart).

You can also find proper package for kentico 11 in this post, called 'v11.0.10'.

Best regards, Dragoljub

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.