---
title: "TypoScript string formats"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:string-formats@main"
source: "Syntax/StringFormats/Index.rst"
rendered: "2026-09-19T06:55:14+00:00"
---

# TypoScript string formats {#string-formats}

The values assigned to properties in TypoScript are internally handled as
strings.

Some properties expect a certain format of string. These formats are described
in this chapter.

Enforcing these string formats is up to the implementation of the property using
them. They are therefore no real constructs of the TypoScript syntax.

-   [boolean](https://docs.typo3.org/permalink/t3tsref:boolean@main)
-   [date-conf](https://docs.typo3.org/permalink/t3tsref:date-conf@main)
-   [function name](https://docs.typo3.org/permalink/t3tsref:function-name@main)
-   [integer](https://docs.typo3.org/permalink/t3tsref:integer@main)
-   [path](https://docs.typo3.org/permalink/t3tsref:path@main)
-   [resource](https://docs.typo3.org/permalink/t3tsref:resource@main)
-   [string](https://docs.typo3.org/permalink/t3tsref:string@main)

## boolean {#data-type-boolean}

-   **boolean**

    Possible values for boolean variables are `1` and `0`
    meaning TRUE and FALSE.

    Everything else is [evaluated to one of these values by PHP](https://www.php.net/manual/en/language.types.boolean.php):
    Non-empty strings (except `0` \[zero\]) are treated as TRUE,
    empty strings are evaluated to FALSE.

    **Examples**

    **EXT:site_package/Configuration/Sets/Main/setup.typoscript**

    ```typoscript
    dummy.enable = 0   # false, preferred notation
    dummy.enable = 1   # true,  preferred notation
    dummy.enable =     # false, because the value is empty
    ```

## date-conf {#data-type-date-conf}

-   **date-conf**

    Used to format a date, see PHP function `date()`. See the
    documentation of [allowed date time formats in
    PHP](https://www.php.net/manual/en/datetime.format.php).

    **Example**

    **EXT:site_package/Configuration/Sets/Main/setup.typoscript**

    ```typoscript
    page.10.date-conf = d-m-y
    ```

## function name {#data-type-function-name}

-   **function name**

    Indicates a function or method in a class to call. See more information at
    the [USER cObject](https://docs.typo3.org/permalink/t3tsref:cobj-user@main).

    **Examples**

    Method name in a namespaced class:

    ```typoscript
    lib.someThing = USER_INT
    lib.someThing.userFunc = MyVendor\MyExtension\SomeNamespace\SomeClass->someFunction
    ```

    **EXT:my_extension/Classes/SomeNamespace/SomeClass.php**

    ```php
    <?php

    namespace MyVendor\MyExtension\SomeNamespace;

    use Psr\Http\Message\ServerRequestInterface;

    class SomeClass
    {
      /**
       * @param string $content Empty string (no content to process)
       * @param array $conf TypoScript configuration
       */
      public function someFunction(string $content, array $conf, ServerRequestInterface $request): string
      {
        $changedContent = $content;
        // Do something
        return $changedContent;
      }
    }

    ```

## integer {#data-type-integer}

-   **integer**

    **Examples**

    42, -8, -9, 0

    Positive integers expect to be greater or equal zero.

## path {#data-type-path}

-   **path**

    Path relative to the root directory from which we operate.
    Also resolves `EXT:` syntax.

    **Example**

    **EXT:site_package/Configuration/Sets/Main/setup.typoscript**

    ```typoscript
    page.10.settings.somePath = fileadmin/stuff/
    ```

## resource {#data-type-resource}

-   **resource**

    <!-- TODO: no Markdown rendering for "versionchanged" -->

    The resource handling has been streamlined, see
    System resource API for system file access and public
    URI generation. It now
    supports different resource formats.These types are supported:

    -   **package resource** – a file inside an extension
    -   **FAL resource** – a file from FAL storage
    -   **app resource** – a file in the TYPO3 project folder
    -   **URI resource** – a URL

    **Examples**

    Reference to a file in the file system:

    **EXT:site_package/Configuration/Sets/Main/setup.typoscript**

    ```typoscript
    # PKG should be preferred to EXT
    page.10.settings.someFile = PKG:my-vendor/package-name:Resources/Public/Icons/MyIcon.svg

    # EXT still works
    page.10.settings.someFile = EXT:ext_name/Resources/Public/Icons/MyIcon.svg

    # App resources (files in the webroot) can be accessed with PKG:typo3/app:
    page.10.settings.someFile = PKG:typo3/app:public/typo3temp/assets/style.css

    # A FAL resource
    page.10.settings.someFile = FAL:1:/identifier/of/file.svg

    # External URL
    page.10.settings.someFile = https://www.example.com/my/image.svg

    # URIs relative to the current host can be prefixed with URI:
    page.10.settings.someFile = URI:/path/to/my/image.svg

    ```

## string {#data-type-string}

-   **string**

    Any property in TypoScript is a string technically. String can be defined
    in a single line or with multiple lines, using the
    [Multiline assignment with "(" and ")"](https://docs.typo3.org/permalink/t3tsref:typoscript-syntax-syntax-multiline-values@main).

    **Example**

    **EXT:site_package/Configuration/Sets/Main/setup.typoscript**

    ```typoscript
    page.10.value = The quick brown fox jumps over the lazy dog.
    ```

    **Extension examples, file Configuration/TypoScript/Syntax/ObjectUnset/setup.typoscript**

    ```typoscript
    myIdentifier.mySubIdentifier = TEXT
    myIdentifier.mySubIdentifier = myValue
    myIdentifier.mySubIdentifier.stdWrap = <p>|</p>

    # "myIdentifier.mySubIdentifier" is completely removed, including value
    # assignment and sub identifier "stdWrap"
    myIdentifier.mySubIdentifier >

    # Same as above: Everything after ">" operator is considered a comment
    myIdentifier.mySubIdentifier > // Some comment

    ```
