You wish to display a FAQ list on your website. When a user clicks on a question, the answer will expand.
There exists more than one way to create a FAQ section.
- The first method would be to create individual snippets, manually add each of them to a panel page, and then format them as collapsed elements in order to form an accordion (see the section “Adding collapsible content / creating an accordion-style list” for more details).
- Advantage: With the help of anchors, you can create direct links to individual snippets, which would be expanded on page load.
- Disadvantage: The titles that appear on the page are not pulled from the snippet, but are entered manually via the Panel Page, so regular contributors or editors cannot modify them.
- The second method, as exemplified in the image above, is to use the FAQ Entry module and display the entries in a much smaller formatted list using Views. (Example 1, example 2)
- Advantage: The titles are visually smaller, so they don’t take up as much space on a page. Moreover, since the list is managed through a View, the titles are pulled straight from the FAQ Entry node, so regular contributors and editors can modify them and can also add more entries to the FAQ list.
- Disadvantage: You cannot make use of anchors to expand a FAQ Entry node.
The following will explain how to proceed with the second method.
Required modules: uOttawa FAQ