Adding an accordion to a page or multiple pages on your site can help improve user experience, especially on mobile devices. It's best to model this out using repeaters.
The Repeater field is a group of one or more content fields of any combination that can be repeated multiple times within a Page. Commonly used examples would be an Image Carousel, Sliders, and FAQs, We have used this to showcase customer feedback on our homepage.
Step 1: Create a Component with a Repeater field
This will serve as a template for each of the questions you are adding to your homepage. In this example, we will be adding the following fields to a repeater within a component so you can repeat the same set of fields over and over again:
- Question
- Answer
Step 2: Create your first Question and Answer using the schema you built.
Step 3: Click on the + Q&A button to add another repeater to your page.
Step 4: Continue adding the questions and answers for all your FAQs.