Kentico - How to display data from the Uni Selector in the MVC

Henderson Barrows asked on February 8, 2022 07:19

I want to display the Uni Selector field from one of the pages in the .cshtml file. Now I have the controller and everything else added (can show for example title of the page, image etc.). Now, I am struggling with displaying those fields from the Uni Selector selected items. Basically, I have the folder where all my lets say cards are stored. And I added the field Uni Selector in the page itself, so that the page has those cards that are selected (not every card, of course only those that are selected). How to show those fields from those cards that are selected in the Uni Selector.

Model

I do have the model and what do I need to add as a prop since I do have this in the code return ValidationHelper.GetString(GetValue("TestimonialCards"), @"");. Should I add for example List<TestimonialCards> or something like that, beacuse I do also have the code for these cards that have these fields: Icon, Title, Description

Recent Answers


vasu yerramsetti answered on February 8, 2022 14:09

We have built Repeater widget with dynamically select page type, Select top N pages, Order by, Where condition etc.,

You can check the source code from the following link -

https://github.com/vasu-rbt/kentico12-mvc-widgets/tree/master/Raybiztech.Kentico12.MVC.Widgets/Raybiztech.Kentico12.MVC.Widgets.Repeater

Hope it helps you.

0 votesVote for this answer Mark as a Correct answer

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