Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,090 of 9,090 pages
About the help in other languages
All help pages

Frequently asked questions as an accordion

The Accordion block (Items "Title|Content" per line, Open first item), or the Accordion (List) block over content items.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/build-two-ways/examples/build/faq-accordion.md

On this page

Frequently asked questions as an accordion

Five questions and answers that open on click.

Life cycle: Build, example 14 of 35. Worked out on the Fit & Healthy site of Exponential 6.0.15+.

Contents

  1. In the Layouts editor
  2. With templates
  3. Which to choose
  4. Check

In the Layouts editor

  1. Open Layouts > Layouts and the layout Landing Page / Home; the editor opens it in a draft.
  2. Open the block palette (+ at the top left) and drag Accordion (group Basic) into the zone main.
  3. Select the block, open the Design tab and fill Items (Title|Content per line), one question per line as Question|Answer, and Open first item.
  4. Publish layout. The pages that use the layout show the block on their next view.

When the questions are content items (for example the class Accordion item), use Accordion (List) (group Listing) with a collection instead.

With templates

  1. Fetch the questions as content and print them with <details>:
{def $faq = fetch( 'content', 'list', hash( 'parent_node_id', <folder node id>, 'class_filter_type', 'include', 'class_filter_array', array( 'ng_accordion_item' ) ) )}
{foreach $faq as $q}
<details><summary>{$q.name|wash}</summary>{attribute_view_gui attribute=$q.data_map.description}</details>
{/foreach}
{undef $faq}

The class Accordion item (ng_accordion_item) has the fields title and description.

Which to choose

A few questions on one page: the Accordion block. Many questions reused on several pages: content items and a list.

Check

  • Each question opens and closes with the keyboard too.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x