---
title: "Elements Ordering"
manual: "Content Blocks"
version: "main"
permalink: "https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:elements-ordering@main"
source: "API/ElementsOrdering/Index.rst"
rendered: "2026-09-22T14:15:39+00:00"
---

# Elements Ordering {#elements-ordering}

By default, there is no deterministic ordering for Content Blocks. The main
way to have an order in place is to use the priority system. Each Content Block
can have an individual priority, which is simply a number. The higher, the more
priority it has and will be displayed before elements with less or no priority.

**EXT:your_extension/ContentBlocks/ContentElements/my-element/config.yaml**

```yaml
name: example/my-element
priority: 20
```

## Dependency ordering {#dependency-ordering}

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

An alternative to the priority system is a dependency ordering, which is part
of the TYPO3 Core and based on pageTS config. There you can define, whether
an element should be displayed before or after another element.

Syntax:

`mod.wizards.newContentElement.wizardItems.{group}.elements.{typeName}.[before|after] = {typeName,[...]}`

**EXT:your_extension/ContentBlocks/ContentElements/my-element/page.tsconfig**

```typoscript
mod.wizards.newContentElement.wizardItems {
    default.elements {
        textmedia {
            after = header
        }
        article_card {
            after = textmedia
        }
        # Multiple elements can be specified (comma-separated)
        article_list {
            after = header,textmedia
        }
        # Or use before
        header {
            before = textmedia
        }
    }
}
```

> [!TIP]
> Since Content Blocks version 2.3 you can place a page.tsconfig file inside
> your Content Block folder and use it as a [Site Set](https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:api-site-sets@main).

> [!TIP]
> This feature is especially helpful, if you want to position your Content
> Blocks relative to a core-defined element.
