---
title: "TypoScript imports"
manual: "Site Package Tutorial"
version: "14.3"
permalink: "https://docs.typo3.org/permalink/t3sitepackage:typoscript-configuration@14.3"
source: "ContentMapping/TypoScript.rst"
rendered: "2026-10-01T16:42:56+00:00"
---

# TypoScript imports {#typoscript-configuration}

In step [Minimal site package - The TYPO3 Fluid
version](https://docs.typo3.org/permalink/t3sitepackage:minimal-extension-fluid@14.3) we placed all TypoScript into
the site set, file
`packages/site-package/Configuration/Sets/SitePackage/setup.typoscript`.

In the following chapters we will need additional TypoScript setup
configurations.

Theoretically you could put all TypoScript into one big file and it would work
fine. But you have better overview if you split it up in multiple files ordered
by purpose.

Familiarize yourself with the TypoScript `@import` syntax first:
[TYPO3 Explained, @import syntax](https://docs.typo3.org/m/typo3/reference-typoscript/14.3/en-us/Syntax/FileImports/Index.html#typoscript-syntax-includes).

-   [Import the TypoScript from a different location](https://docs.typo3.org/permalink/t3sitepackage:import-the-typoscript-from-a-different-location@14.3)
-   [Import all TypoScript files from a folder using a wildcard](https://docs.typo3.org/permalink/t3sitepackage:import-all-typoscript-files-from-a-folder-using-a-wildcard@14.3)
-   [Structure of the Configuration directory](https://docs.typo3.org/permalink/t3sitepackage:structure-of-the-configuration-directory@14.3)

## Import the TypoScript from a different location {#typoscript-import}

Create a new folder called `Configuration/Sets/SitePackage/TypoScript`. In this
create a file called `page.typoscript` and copy the content from
file `Configuration/Sets/SitePackage/setup.typoscript`
into it.

Then change the latter file to contain the following:

**Configuration/Sets/SitePackage/setup.typoscript**

```typoscript
@import './TypoScript/page.typoscript'
```

Flush the caches and preview the page. The output should be unchanged.

## Import all TypoScript files from a folder using a wildcard {#typoscript-import-wildcard}

We will create more TypoScript files in the next steps. We could import them
file by file. But as the order will not matter we can import all of them via
wildcard:

**packages/my_site_package/Configuration/Sets/SitePackage/setup.typoscript**

```typoscript
@import './TypoScript/*.typoscript'
@import './TypoScript/Navigation/*.typoscript'

```

Only files from the folder directly will be imported. If you create subfolders
later on you have to import them separately.

## Structure of the `Configuration` directory {#typoscript-import-configuration}

Your `Configuration` directory should now have the following structure:

-   packages/my_site_package/Configuration
    -   Sets
        -   SitePackage
            -   TypoScript
                -   page.typoscript
            -   config.yaml
            -   setup.typoscript

In the next steps you will create more TypoScript files to configure the
[Content mapping](https://docs.typo3.org/permalink/t3sitepackage:content-mapping@14.3) and the
[menus](https://docs.typo3.org/permalink/t3sitepackage:main-menu-creation@14.3).
