building a carousel with variable number of slides

mun yung kan asked on November 27, 2015 09:07

I'm trying to build a carousel that has an image, a line of text and links to a page in the site.

the current way i've done is to set a fixed number of fields in the webparts (10 copies of text, image selectors and url selectors.

is there a better way to this? where i can store a collection of carousel objects with the field, and then allow the cms users to pick the ones they want.

Correct Answer

David te Kloese answered on November 27, 2015 09:52

Hi,

you could create a custom form control to do this:

https://docs.kentico.com/display/K82/Example+-+Developing+custom+form+controls

But what I'd use is a custom page type. In which you create the 3 fields. In your carousel (repeater) you let the editor pick a path or property or relation or... (whatever suits your need). This way you can also make sure the 'image slides' can be easily reused in an other place.

Greets,

David

3 votesVote for this answer Unmark Correct answer

Recent Answers


Laura Frese answered on November 27, 2015 18:49

I agree with David. The custom page type is the best way to handle creating carousel items. I wrote a blog post on using carousels with kentico a while back that you might find helpful.

3 votesVote for this answer Mark as a Correct answer

mun yung kan answered on November 30, 2015 03:34

Thanks David!

thats how i would do it in other CMS' i have used before, just wasnt sure how to implement it in kentico.

thanks for the shove in the right direction!

0 votesVote for this answer Mark as a Correct answer

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