---
title: "TypoScript"
manual: "schema"
version: "main"
permalink: "https://docs.typo3.org/permalink/brotkrueml/schema:typoscript@main"
source: "TypoScript/Index.rst"
rendered: "2026-09-18T07:29:46+00:00"
---

# TypoScript {#typoscript-1}

Target group: **Integrators**

## Content Object (cObject) `SCHEMA` {#content-object-cobject-ts-schema}

The extension provides the cObject `SCHEMA`. The cObject itself will not
display anything. Instead it will add configured types to the global schema
output.

A small example:

**EXT:my_extension/Configuration/TypoScript/setup.typoscript**

```typoscript
page = PAGE
page.10 = SCHEMA
page.10 {
   type = WebSite
   properties {
      name.field = seo_title // title
      description.field = description
   }
}
```

That will add an element of type `WebSite` to schema. It will consist of the
property `name` as well as `description`.
The `name` property will be filled from the `seo_title` field, falling back to
the `title` field.

> [!NOTE]
> Using the `SCHEMA` cObject in an array-like structure is **not** possible
> by now, like the following example:
>
> ```json
> {
>    "@context": "https://schema.org/",
>    "@type": "Event",
>    "offers": [{
>       "@type": "Offer",
>       "name": "Ticket 1",
>       "price": "80",
>       "priceCurrency": "EUR"
>    }, {
>       "@type": "Offer",
>       "name": "Ticket 2",
>       "price": "120",
>       "priceCurrency": "EUR"
>    }]
> }
> ```
>
> For example, a [USER](https://docs.typo3.org/m/typo3/reference-typoscript/14.3/en-us/ContentObjects/UserAndUserInt/Index.html#cobj-user) cObject and the
> [PHP API](https://docs.typo3.org/permalink/brotkrueml/schema:api@main) can be used instead.

### Top-level properties {#top-level-properties}

The cObject `SCHEMA` provides the following top-level properties:

-   **type**

    -   *Data type:* string / [stdWrap](https://docs.typo3.org/m/typo3/reference-typoscript/14.3/en-us/Functions/Stdwrap.html#stdwrap)

    Defines the schema type to use, see: [List of available types](https://docs.typo3.org/permalink/brotkrueml/schema:available-types@main).

    **Example:**

    **EXT:my_extension/Configuration/TypoScript/setup.typoscript**

    ```typoscript
    page.10 = SCHEMA
    page.10.type = WebSite
    ```

-   **id**

    -   *Data type:* string / [stdWrap](https://docs.typo3.org/m/typo3/reference-typoscript/14.3/en-us/Functions/Stdwrap.html#stdwrap)

    The ID added as `@id` to the type, if defined.

    **Example:**

    **EXT:my_extension/Configuration/TypoScript/setup.typoscript**

    ```typoscript
    page.10 = SCHEMA
    page.10.type = WebSite
    page.10.id {
       typolink {
          parameter = t3://page?uid={site : rootPageId}
          parameter.insertData = 1
          forceAbsoluteUrl = 1
          returnLast = url
       }
    }
    ```

-   **properties**

    -   *Data type:* array

    The key will be used as property name.
    The value can be a static text, an array, a content object, a
    [stdWrap](https://docs.typo3.org/m/typo3/reference-typoscript/14.3/en-us/Functions/Stdwrap.html#stdwrap) property or an [if](https://docs.typo3.org/m/typo3/reference-typoscript/14.3/en-us/Functions/If.html#if) condition.

    **Example:**

    **EXT:my_extension/Configuration/TypoScript/setup.typoscript**

    ```typoscript
    page.10 = SCHEMA
    page.10.type = WebSite
    page.10.properties {
       name.field = seo_title // title
       description.field = description
    }
    ```

    A property can be a `SCHEMA` again, which will result in nested structures.

    **Example:**

    **EXT:my_extension/Configuration/TypoScript/setup.typoscript**

    ```typoscript
    page.10 = SCHEMA
    page.10.type = WebSite
    page.10.properties {
       publisher = SCHEMA
       publisher {
          id {
             typolink {
                parameter = t3://page?uid={site : rootPageId}#organization
                parameter.insertData = 1
                forceAbsoluteUrl = 1
                returnLast = url
             }
          }
       }
    }
    ```

    Multiple values can also be assigned to one property using numeric keys.

    **Example:**

    **EXT:my_extension/Configuration/TypoScript/setup.typoscript**

    ```typoscript
    page.10 = SCHEMA
    page.10 {
       type = Organization
       properties {
          name = My Company
          sameAs {
             10 = https://example.org/
             20.typolink {
                parameter = t3://page?uid=42
                forceAbsoluteUrl = 1
                returnLast = url
             }
          }
       }
    }
    ```

-   **if**

    -   *Data type:* [if](https://docs.typo3.org/m/typo3/reference-typoscript/14.3/en-us/Functions/If.html#if)

    Prevents processing of the whole cObject if it evaluates to `false`.

    **Example:**

    **EXT:my_extension/Configuration/TypoScript/setup.typoscript**

    ```typoscript
    page.10 = SCHEMA
    page.10 {
       if {
          equals.data = site : rootPageId
          value.field = uid
       }
       type = WebSite
    }
    ```
