Creating FAQ page for a site using AEM components. | Community
Skip to main content
Level 3
April 16, 2022
Solved

Creating FAQ page for a site using AEM components.

  • April 16, 2022
  • 2 replies
  • 2213 views

Want to create a FAQ page using AEM components. What all components can be used for the same and how can I achieve their styling manipulation?

I guess I need to add a text field for a question and for answer a text area for answer. How can I add some show hide styling to the answer field?

 

For ex u can see the screenshots below.

 

 

Best answer by milind_bachani

Hi @manasi29 ,

 

You can use the core accordion component for FAQ page , the following link will help :
https://experienceleague.adobe.com/docs/experience-manager-core-components/using/components/accordion.html?lang=en

Thanks,

Milind

2 replies

milind_bachani
Adobe Employee
milind_bachaniAdobe EmployeeAccepted solution
Adobe Employee
April 16, 2022

Hi @manasi29 ,

 

You can use the core accordion component for FAQ page , the following link will help :
https://experienceleague.adobe.com/docs/experience-manager-core-components/using/components/accordion.html?lang=en

Thanks,

Milind

Level 2
May 3, 2022

Hi @manasi29 

 

One approach to add styling to your Accordion is that you can add your own custom sass. For the icons, there are two default classes for normal and expanded view button, you can add icons there. It's better to use your own custom sass.

 

 

.cmp-accordion__button {
content: <here you can add either URL of icon using url(" ") or the variable which you have already defined in your variables sass>;
}
.cmp-accordion__button--expanded {}

 

Defining variables is better approach.