1

I'm hoping to get some help or guidance on a issue that I'm having. I am using Bootstrap 4 as my CSS framework and wanted to integrate a working Carousel with my web project. I managed to get the jumbotron working with a Matrix field. See below:

enter image description here

enter image description here

I was hoping that I could create a Carousel Matrix block in a similar fashion as the Jumbotron that was created previously. Any suggestions on a proper setup?

1 Answer 1

2

A matrix field for an image carousel needs only a single asset field, one that will accept more than one image. In my experience there is rarely a requirement for anything more. 99% of carousels I have implemented look like this:

An example matrix field for an image carousel

If you wanted to add text to accompany each slide you could add a text field directly to the image asset and then display that with each carousel slide:

A Craft CMS asset field

4
  • Right, I just worry about the text to accompany each image for the carousel, since the 'Text' Matrix field is only applied once.
    – egivensjr
    Jun 27, 2019 at 14:02
  • 1
    You could just attach a text field to image assets to create an image caption for each slide if you wanted. In my example above the text field is a separate block entirely, a Redactor field for entering standard copy, it has nothing to do with the carousel. Jul 1, 2019 at 9:02
  • That's perfect! This would solve my problem. I was over thinking it. Thank you so much for replying.
    – egivensjr
    Jul 1, 2019 at 14:55
  • No problem. I've expanded on my answer to include details for adding image captions. If you feel this is the answer to your question @egivensjr kindly mark it as the accepted answer. Thanks. Jul 3, 2019 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.