---
title: "Configuration methods for extensions"
manual: "TYPO3 Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3coreapi:extension-configuration@main"
source: "ExtensionArchitecture/HowTo/Configuration.rst"
modified: "2026-09-14T11:10:56+00:00"
---

# Configuration methods for extensions

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

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-configuration-reference@main)
> -   [Constants](https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/UsingSetting/Constants.html#typoscript-syntax-what-are-constants)

## Extension configuration

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 **System > Settings > Extension Configuration** and is
stored in `config/system/settings.php`.

> [!NOTE]
> **Changed in version 14.0**
>
> This module has been moved from **Admin tools** to **Settings**.
> See also: [Feature: #107628 - Improved backend module naming and structure](https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/14.0/Feature-107628-ImprovedBackendModuleNamingAndStructure.html#feature-107628-1729026000).

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@main)

## FlexForms

[FlexForms](https://docs.typo3.org/permalink/t3coreapi:flexforms) define
forms that can be used by editors to configure plugins and content elements.

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

If you want to access a setting 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)

## 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

**Class MyVendor\\MyExtension\\Controller\\PostController**

```php
<?php

declare(strict_types=1);

namespace MyVendor\MyExtension\Controller;

use MyVendor\MyExtension\Domain\Repository\BlogRepository;
use Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;

class PostController extends ActionController
{
  public function __construct(BlogRepository $blogRepository) {}

  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

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

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