---
title: "Frontend TypoScript"
manual: "TYPO3 Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3coreapi:typo3-request-attribute-frontend-typoscript@main"
source: "ApiOverview/RequestLifeCycle/RequestAttributes/FrontendTyposcript.rst"
rendered: "2026-09-17T14:31:42+00:00"
---

# Frontend TypoScript {#frontend-typoscript}

The `frontend.typoscript` frontend request attribute provides access to the
`\TYPO3\CMS\Core\TypoScript\FrontendTypoScript` object. It contains
the calculated TypoScript `settings` (formerly `constants`) and
sometimes `setup`, depending on page cache status.

When a content object or plugin (plugins are content objects as well) needs the
current TypoScript, it can retrieve it using this API:

```php
// Substitution of $GLOBALS['TSFE']->tmpl->setup
$fullTypoScript = $request->getAttribute('frontend.typoscript')
    ->getSetupArray();
```

## API {#api}

-   **class FrontendTypoScript**

    -   *Fully qualified name:* `\TYPO3\CMS\Core\TypoScript\FrontendTypoScript`

    This class contains the TypoScript set up by the PrepareTypoScriptFrontendRendering
    Frontend middleware. It can be accessed in content objects:

    $frontendTypoScript = $request->getAttribute('frontend.typoscript');

    -   **getFlatSettings()**

        This is *always* set up by the middleware / factory: Current settings ("constants")
        are needed for page cache identifier calculation.

        This is a "flattened" array of all settings, as example, consider these settings TypoScript:

        ```php
        mySettings {
            foo = fooValue
            bar = barValue
        }
        ```

        This will result in this array:

        ```php
        $flatSettings = [
            'mySettings.foo' => 'fooValue',
            'mySettings.bar' => 'barValue',
        ];
        ```

        *Returns:* `array`

    -   **getSetupArray()**

        The full Frontend TypoScript array.

        This is always set up as soon as the Frontend rendering needs to actually render something and
        can not get the *full* content from page cache. This is the case when a page cache entry does
        not exist, or when the page contains COA_INT or USER_INT objects.

        *Returns:* `array`

    -   **getConfigArray()**

        Array representation of getConfigTree().

        *Returns:* `array`
