---
title: "Configuration"
manual: "Ai3 FAQ"
version: "0.9"
permalink: "https://docs.typo3.org/permalink/wegewerk/ai3_faq:configuration@0.9"
source: "Configuration/Index.rst"
rendered: "2026-10-23T16:31:05+00:00"
---

# Configuration {#configuration}

## Ai3 Core Dependency {#configuration-ai3-core}

Ai3 FAQ relies on the configuration of **Ai3 Core**. Ensure that
[`wegewerk/ai3_core`](https://packagist.org/packages/wegewerk/ai3_core) is properly installed and configured with
valid API credentials for the ZAK-AI service.

## API Credentials {#configuration-api-credentials}

The API credentials for the ZAK-AI service are provided via environment
variables consumed by `Wegewerk\Ai3Core\Api\ZakAiClient`:

-   `ZAKAI_API_KEY` -- your ZAK-AI API key.
-   `ZAKAI_SECRET` -- your ZAK-AI secret.

Set these environment variables in your system or in your `.env` file:

**Environment variables**

```bash
export ZAKAI_API_KEY=your-api-key-here
export ZAKAI_SECRET=your-secret-here
```

## Bootstrap Package Integration {#configuration-bootstrap-package}

The extension requires [`bk2k/bootstrap-package`](https://packagist.org/packages/bk2k/bootstrap-package) for accordion
functionality. The FAQ content element uses the Bootstrap Package accordion
configuration and FlexForm settings.

The accordion configuration is automatically applied via TCA:

**TCA configuration for accordion**

```php
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
    '*',
    'FILE:EXT:bootstrap_package/Configuration/FlexForms/Accordion.xml',
    'ai3_faq'
);
```

## Schema.org Configuration {#configuration-schema-markup}

The extension uses [`brotkrueml/schema`](https://packagist.org/packages/brotkrueml/schema) to generate structured
data markup for FAQ pages. This improves SEO and enables rich snippets
in search results.

The schema markup is automatically generated when the FAQ is rendered
on the frontend, using the `FAQPage` schema type.

## TypoScript {#configuration-typoscript}

The extension automatically loads its TypoScript configuration. The setup
includes:

**TypoScript configuration**

```typoscript
# Content element registration
tt_content.ai3_faq < lib.contentElement
tt_content.ai3_faq {
    templateName = Accordion
    # Uses Bootstrap Package accordion template
}
```

## Backend AJAX Routes {#configuration-ajax-routes}

The extension registers AJAX routes for backend communication:

**Backend/AjaxRoutes.php**

```php
return [
    'ai3_faq_generate' => [
        'path' => '/ai3/faq/generate',
        'target' => \Wegewerk\Ai3Faq\Controller\Ajax\ArticlefaqController::class . '::getFaq'
    ],
];
```

## Language Support {#configuration-languages}

The extension currently supports German (`de`) language output from the
ZAK-AI API. Additional languages can be configured by modifying the
language options in the JavaScript module:

**Language configuration in faq.js**

```javascript
getLanguageOptions() {
     return [
         {
             value: 'de',
             label: 'Deutsch'
         }
         // Add more languages here
     ]
}
```

## Customization Options {#configuration-customization}

### Accordion Styling {#accordion-styling}

The FAQ accordion inherits styling from Bootstrap Package. You can customize
the appearance by overriding Bootstrap variables or CSS classes:

**Custom accordion styling**

```css
.accordion-item {
    /* Custom FAQ accordion styling */
}
```

### Template Override {#template-override}

To customize the FAQ output template, override the Accordion template
from Bootstrap Package in your site package:

**Template path**

```text
EXT:your_sitepackage/Resources/Private/Templates/ContentElements/Accordion.html
```

### Field Configuration {#field-configuration}

The extension adds custom TCA fields that can be configured:

**Custom TCA fields**

```php
'tx_ai3_faq_generator' => [
    'exclude' => true,
    'label'   => 'LLL:EXT:ai3_faq/Resources/Private/Language/locallang.xlf:tx_ai3.faq.generator',
    'config'  => [
        'type'       => 'user',
        'renderType' => 'ai3FaqGeneratorElement',
    ],
]
```
