---
title: "Configuration methods for extensions"
manual: "TYPO3 Explained"
version: "12.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:extension-configuration@12.4"
source: "ExtensionArchitecture/HowTo/Configuration.rst"
rendered: "2026-10-21T15:29:37+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v12 has reached end-of-life as of April 30th 2026 and
> is no longer being maintained. Use the version switcher on the top
> left of this page to select documentation for a supported version of TYPO3.
>
> Need more time before upgrading?
> You can purchase Extended Long Term Support (ELTS) for TYPO3 v12 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# Configuration methods for extensions {#extension-configuration}

There are several possibilities to make your extension configurable. From the
various options described here each differs in:

-   the scope to what the configuration applies (extension, pages,
    plugin)
-   the access level required to make the change (editor, admin)

## TypoScript and constants {#typoscript-and-constants}

You can define configuration options using TypoScript.
These options can be changed via TypoScript constants and setup in the backend.
The changes apply to the current page and all subpages.

> [!NOTE]
> **See also**
>
> -   [Extbase TypoScript configuration](https://docs.typo3.org/permalink/t3coreapi:extbase-typoscript-configuration@12.4)
> -   [Constants](https://docs.typo3.org/m/typo3/reference-typoscript/12.4/en-us/UsingSetting/Constants.html#typoscript-syntax-what-are-constants)

## Extension configuration {#extension-configuration-1}

Extension configuration is defined in the file [`ext_conf_template.txt`](../FileStructure/ExtConfTemplate.md#file-extension-ext-conf-template-txt)
using TypoScript constant syntax.

The configuration options you define in this file can be changed in the
backend **Admin Tools > Settings > Extension Configuration** and is stored in `config/system/settings.php`.

Use this file for general options that should be globally applied to the extension.

> [!NOTE]
> **See also**
>
> -   [ext_conf_template.txt](https://docs.typo3.org/permalink/t3coreapi:extension-options@12.4)

## FlexForms {#flexforms}

FlexForms can be configured in the backend by editors. With FlexForms you can
configure each plugin or content element individually without adding extra fields to the `tt_content` table.

In Extbase plugins, settings made in the FlexForm of a plugin
override settings made in the TypoScript configuration of that plugin.

> [!NOTE]
> If you wish to access a setting set via FlexForm in Extbase from your controller via
> `$this->settings`, the name of the setting must begin with **settings**,
> directly followed by a dot (`.`).

> [!NOTE]
> **See also**
>
> -   [FlexForms](https://docs.typo3.org/permalink/t3coreapi:flexforms@12.4)

### Example {#example}

**EXT:blog_example/Configuration/FlexForms/PluginSettings.xml**

```xml
<T3DataStructure>
    <sheets>
        <sDEF>
            <ROOT>
                <sheetTitle>Options</sheetTitle>
                <type>array</type>
                <el>
                    <settings.itemsPerPage>
                        <label>Max. number of items to display per page</label>
                        <config>
                            <type>input</type>
                            <size>2</size>
                            <eval>int</eval>
                            <default>3</default>
                        </config>
                    </settings.itemsPerPage>
                </el>
            </ROOT>
        </sDEF>
    </sheets>
</T3DataStructure>
```

## Access settings {#access-settings}

The settings can be read using `$this->settings` in an
Extbase controller action and via `{settings}` within Fluid.

### Example: Access settings in an Extbase controller {#example-access-settings-in-an-extbase-controller}

**Class T3docs\\BlogExample\\Controller\\PostController**

```php
use Psr\Http\Message\ResponseInterface;

class PostController extends \T3docs\BlogExample\Controller\AbstractController
{
    public function displayRssListAction(): ResponseInterface
    {
        $defaultBlog = $this->settings['defaultBlog'] ?? 0;
        if ($defaultBlog > 0) {
            $blog = $this->blogRepository->findByUid((int)$defaultBlog);
        } else {
            $blog = $this->blogRepository->findAll()->getFirst();
        }
        $this->view->assign('blog', $blog);
        return $this->responseFactory->createResponse()
            ->withHeader('Content-Type', 'text/xml; charset=utf-8')
            ->withBody($this->streamFactory->createStream($this->view->render()));
    }
}
```

## YAML {#yaml}

Some extensions offer configuration in the format YAML,
see [YAML](https://docs.typo3.org/permalink/t3coreapi:config-overview-yaml@12.4).

There is a [YamlFileLoader](https://docs.typo3.org/permalink/t3coreapi:yamlfileloader@12.4) which can be used to load YAML
files.
