> For the complete documentation index, see [llms.txt](https://docs.codenation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codenation.com/admin-tag-customisations/collapsed-accordions.md).

# Collapsed Accordions

{% hint style="info" %}
Live Demo: [https://campaign.codenation.com/donation\_v2](https://candidate.codenation.com/donation_v2)
{% endhint %}

<figure><img src="https://files.gitbook.com/v0/b/gitbook-legacy-files/o/assets%2F-LeL-FYaRUlvUn8HHUaD%2F-MJ9fkXStaNtkIqDTdPc%2F-MJ9hmOO56GXJKdSMeCH%2FzNucsXrzC4.gif?alt=media&#x26;token=857817d3-1aca-447f-976c-5d51ab60ee55" alt="" width="563"><figcaption><p>What is an accordion?</p></figcaption></figure>

## Adding a Collapsed Accordion:

1. Navigate to the basic content field of a page you want the accordion to display and add 2 horizontal lines (`<hr>`) above the start of where you want the the accordion to show.&#x20;
2. Continue building the accordion by repeating the pattern of separating headings from content using 2 horizontal lines (`<hr>`). E.g.

<figure><img src="/files/2duXNGSkUK5LPSaXIYmc" alt="How to add an accordion inside a pages content" width="563"><figcaption><p>How to add an accordion inside a pages content</p></figcaption></figure>

3. Save the content and preview the result.

{% hint style="info" %}
To alternate the background color and headings of the accordion using your theme colors, add the 'Admin Colored Accordion' tag to the tags list for the page featuring the accordion content. This tag will dynamically style the accordion headers and panels, creating an alternating color scheme based on your theme's color palette.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.codenation.com/admin-tag-customisations/collapsed-accordions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
