---
title: "TypoScript coding guidelines"
manual: "TYPO3 Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3coreapi:cgl-typoscript@main"
source: "CodingGuidelines/CglTypoScript/Index.rst"
rendered: "2026-09-20T15:52:37+00:00"
---

# TypoScript coding guidelines {#cgl-typoscript}

## Directory and file names {#cgl-typoscript-directory-file-names}

-   The file extension **must** be `.typoscript`.
-   TypoScript files are located in the directory
    `<extension>/Configuration/TypoScript`.
-   File name for constants in static templates: `constants.typoscript`.
-   File name for TypoScript in static templates: `setup.typoscript`.

## Format {#cgl-typoscript-format}

-   Use spaces, not TABs.
-   Use 2 spaces per indenting level.

## More information {#cgl-typoscript-information}

-   See [Setup IDE / editor](https://docs.typo3.org/permalink/t3coreapi:cgl-ide@main) in this manual for information about setting up your
    editor / IDE to adhere to the coding guidelines.
