---
title: "Introduction for developers"
manual: "schema"
version: "main"
permalink: "https://docs.typo3.org/permalink/brotkrueml/schema:developer@main"
source: "Developer/Index.rst"
rendered: "2026-09-29T15:28:17+00:00"
---

# Introduction for developers {#developer}

Target group: **Developers**, **Integrators**

**Table of Contents**

-   [Introduction](https://docs.typo3.org/permalink/brotkrueml/schema:introduction@main)
-   [Quick dive-in](https://docs.typo3.org/permalink/brotkrueml/schema:quick-dive-in@main)

## Introduction {#introduction}

The structured markup can be generated in two ways:

-   using the [API](https://docs.typo3.org/permalink/brotkrueml/schema:api@main)
-   with [view helpers](https://docs.typo3.org/permalink/brotkrueml/schema:view-helpers@main) in Fluid templates

Each type in the [schema.org vocabulary](https://schema.org/docs/schemas.html) corresponds to a **PHP model** that
provides the available properties. There is also a **view helper** for each type
that makes it easy to integrate the data into your website via a Fluid template.

Attention should be paid to the following points:

-   A web page can be characterised by different schema.org types as outlined in
    [this chapter](https://docs.typo3.org/permalink/brotkrueml/schema:for-editors@main). The `WebPage` type is set automatically
    if the corresponding
    [configuration option](https://docs.typo3.org/permalink/brotkrueml/schema:configuration-automaticwebpageschemageneration@main)
    is set. But it can always overridden manually with the desired type and
    properties. The chapter [The WebPage type](https://docs.typo3.org/permalink/brotkrueml/schema:web-page-type@main) is dedicated to this topic.
-   A breadcrumb does not only help the user to recognise the location of a
    particular page on the website. It is also helpful for search engines to
    understand the structure of your website. Google honors the website operator
    for using the [breadcrumb schema markup](https://docs.typo3.org/permalink/brotkrueml/schema:breadcrumb-start@main) on a page:
    It will be shown in the search result snippet.
-   The [main entity](https://docs.typo3.org/permalink/brotkrueml/schema:main-entity-of-web-page@main) of a web page indicates the
    primary entity. It can be set separately from a `WebPage`.

## Quick dive-in {#quick-dive-in}

The [schema.org vocabulary](https://schema.org/docs/schemas.html) consists of many **types**, like `Person`,
`Organization`, `Product`, and so on. They are written with an upper letter
at the beginning of the term.

Each type has several **properties** which characterise the specific type, like
`givenName` or `lastName` for a `Person`. The properties start with a
lower letter at the beginning in the vocabulary.

The most generic type is `Thing`. Each other type inherits the properties
from one or more other types, e.g: `Corporation` is a specific type for
`Organization` and defines a new property. `Organization` itself is a
specific type of `Thing` and inherits the properties of `Thing` and defines
many more properties characterising this type.

You can retrieve the information about a type or property from the URL
*https://schema.org/* followed by the term name. (for example,
*https://schema.org/Person*) or the name of the property
(for example, *https://schema.org/givenName*).

### Models {#models}

This extension provides model classes for each type under the PHP namespace
`\Brotkrueml\Schema\Model\Type`. For example, the type `Thing` is mapped
to the model `\Brotkrueml\Schema\Model\Type\Thing`, which knows about the
according schema.org properties. A property value can be set with an according
method:

**EXT:my_extension/Classes/Controller/MyController.php**

```php
<?php

declare(strict_types=1);

namespace MyVendor\MyExtension\Controller;

use Brotkrueml\Schema\Type\TypeFactory;

final class MyController
{
    public function __construct(
        private readonly TypeFactory $typeFactory,
    ) {}

    public function doSomething(): void
    {
        // ...

        $thing = $this->typeFactory->create('Thing');
        $thing->setProperty('name', 'A thing');

        // ...
    }
}

```

The schema manager connects the type models to the page:

**EXT:my_extension/Classes/Controller/MyController.php**

```php
<?php

declare(strict_types=1);

namespace MyVendor\MyExtension\Controller;

use Brotkrueml\Schema\Manager\SchemaManager;
use Brotkrueml\Schema\Type\TypeFactory;

final class MyController
{
    public function __construct(
        private readonly SchemaManager $schemaManager,
        private readonly TypeFactory $typeFactory,
    ) {}

    public function doSomething(): void
    {
        // ...

        $thing = $this->typeFactory->create('Thing');
        $thing->setProperty('name', 'A thing');

        $this->schemaManager->addType($thing);

        // ...
    }
}

```

The chapter [Using The API](https://docs.typo3.org/permalink/brotkrueml/schema:api@main) describes in-depth how to use the models
and the schema manager.

> [!NOTE]
> The models were generated from the schema.org definition and will be updated
> as the standard evolves.

### View helpers {#view-helpers}

For usage in Fluid templates, each type is mapped to a view helper in the
`schema:type` namespace. You assign the type properties as view helper
arguments, for example:

```html
<schema:type.thing name="A thing"/>
```

The view helpers can be nested into each other.

The chapter [View helpers](https://docs.typo3.org/permalink/brotkrueml/schema:view-helpers@main) explains the usage of
the view helpers in detail.

> [!NOTE]
> The view helpers were generated from the schema.org definition and will be
> updated as the standard evolves.
